Lines Matching refs:kdev
277 if (connector->kdev) in drm_sysfs_connector_add()
280 connector->kdev = in drm_sysfs_connector_add()
281 device_create_with_groups(drm_class, dev->primary->kdev, 0, in drm_sysfs_connector_add()
288 if (IS_ERR(connector->kdev)) { in drm_sysfs_connector_add()
289 DRM_ERROR("failed to register connector device: %ld\n", PTR_ERR(connector->kdev)); in drm_sysfs_connector_add()
290 return PTR_ERR(connector->kdev); in drm_sysfs_connector_add()
294 return sysfs_create_link(&connector->kdev->kobj, in drm_sysfs_connector_add()
301 if (!connector->kdev) in drm_sysfs_connector_remove()
305 sysfs_remove_link(&connector->kdev->kobj, "ddc"); in drm_sysfs_connector_remove()
310 device_unregister(connector->kdev); in drm_sysfs_connector_remove()
311 connector->kdev = NULL; in drm_sysfs_connector_remove()
321 kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp); in drm_sysfs_lease_event()
342 kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp); in drm_sysfs_hotplug_event()
373 kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp); in drm_sysfs_connector_status_event()
385 struct device *kdev; in drm_sysfs_minor_alloc() local
393 kdev = kzalloc(sizeof(*kdev), GFP_KERNEL); in drm_sysfs_minor_alloc()
394 if (!kdev) in drm_sysfs_minor_alloc()
397 device_initialize(kdev); in drm_sysfs_minor_alloc()
398 kdev->devt = MKDEV(DRM_MAJOR, minor->index); in drm_sysfs_minor_alloc()
399 kdev->class = drm_class; in drm_sysfs_minor_alloc()
400 kdev->type = &drm_sysfs_device_minor; in drm_sysfs_minor_alloc()
401 kdev->parent = minor->dev->dev; in drm_sysfs_minor_alloc()
402 kdev->release = drm_sysfs_release; in drm_sysfs_minor_alloc()
403 dev_set_drvdata(kdev, minor); in drm_sysfs_minor_alloc()
405 r = dev_set_name(kdev, minor_str, minor->index); in drm_sysfs_minor_alloc()
409 return kdev; in drm_sysfs_minor_alloc()
412 put_device(kdev); in drm_sysfs_minor_alloc()