Lines Matching refs:kdev
498 if (connector->kdev) in drm_sysfs_connector_add()
501 connector->kdev = in drm_sysfs_connector_add()
502 device_create_with_groups(drm_class, dev->primary->kdev, 0, in drm_sysfs_connector_add()
509 if (IS_ERR(connector->kdev)) { in drm_sysfs_connector_add()
510 DRM_ERROR("failed to register connector device: %ld\n", PTR_ERR(connector->kdev)); in drm_sysfs_connector_add()
511 return PTR_ERR(connector->kdev); in drm_sysfs_connector_add()
535 if (!connector->kdev) in drm_sysfs_connector_remove()
540 device_unregister(connector->kdev); in drm_sysfs_connector_remove()
541 connector->kdev = NULL; in drm_sysfs_connector_remove()
559 kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp); in drm_sysfs_hotplug_event()
585 struct device *kdev; in drm_sysfs_minor_alloc() local
595 kdev = kzalloc(sizeof(*kdev), GFP_KERNEL); in drm_sysfs_minor_alloc()
596 if (!kdev) in drm_sysfs_minor_alloc()
599 device_initialize(kdev); in drm_sysfs_minor_alloc()
600 kdev->devt = MKDEV(DRM_MAJOR, minor->index); in drm_sysfs_minor_alloc()
601 kdev->class = drm_class; in drm_sysfs_minor_alloc()
602 kdev->type = &drm_sysfs_device_minor; in drm_sysfs_minor_alloc()
603 kdev->parent = minor->dev->dev; in drm_sysfs_minor_alloc()
604 kdev->release = drm_sysfs_release; in drm_sysfs_minor_alloc()
605 dev_set_drvdata(kdev, minor); in drm_sysfs_minor_alloc()
607 r = dev_set_name(kdev, minor_str, minor->index); in drm_sysfs_minor_alloc()
611 return kdev; in drm_sysfs_minor_alloc()
614 put_device(kdev); in drm_sysfs_minor_alloc()