From 04fea060023a539c6c6766ec184b59f32c97d474 Mon Sep 17 00:00:00 2001 From: Jon Smirl Date: Sun, 3 Jul 2005 18:07:03 +0000 Subject: Simplify the sysfs code --- linux-core/drm_stub.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'linux-core/drm_stub.c') diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c index 25af18ba..5496ed89 100644 --- a/linux-core/drm_stub.c +++ b/linux-core/drm_stub.c @@ -165,10 +165,7 @@ static int drm_get_head(drm_device_t * dev, drm_head_t * head) goto err_g1; } - head->dev_class = drm_sysfs_device_add(drm_class, - head, MKDEV(DRM_MAJOR, minor), - DRM_PCI_DEV(dev->pdev), - "card%d", minor); + head->dev_class = drm_sysfs_device_add(drm_class, head); if (IS_ERR(head->dev_class)) { printk(KERN_ERR "DRM: Error sysfs_device_add.\n"); @@ -292,7 +289,7 @@ int drm_put_head(drm_head_t * head) DRM_DEBUG("release secondary minor %d\n", minor); drm_proc_cleanup(minor, drm_proc_root, head->dev_root); - drm_sysfs_device_remove(MKDEV(DRM_MAJOR, head->minor)); + drm_sysfs_device_remove(head->dev_class); *head = (drm_head_t){.dev = NULL}; -- cgit v1.2.3