summaryrefslogtreecommitdiff
path: root/linux-core/drm_stub.c
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2005-07-03 18:07:03 +0000
committerJon Smirl <jonsmirl@yahoo.com>2005-07-03 18:07:03 +0000
commit04fea060023a539c6c6766ec184b59f32c97d474 (patch)
tree9c02925b15d08b9e1d52a3fe7a41a5dabbd75ee0 /linux-core/drm_stub.c
parentd41af11ee30413f90064cfffb5687be92a28021c (diff)
Simplify the sysfs code
Diffstat (limited to 'linux-core/drm_stub.c')
-rw-r--r--linux-core/drm_stub.c7
1 files changed, 2 insertions, 5 deletions
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};