aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/drm/drm_stub.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2005-11-11 22:07:35 +1100
committerDave Airlie <airlied@linux.ie>2005-11-11 22:07:35 +1100
commit732052ed3e7539d87136dd833be523747af3fb3e (patch)
tree7989d3062e50f3edc2a206148c6e776f88e7a2c1 /drivers/char/drm/drm_stub.c
parente96e33eeb8b876c7ec009c557ca5269328eceda0 (diff)
drm: simplify sysfs code for drm
This simplifies the sysfs code for the drm and add a dri_library_name attribute which can be used by a userspace app to figure out which library to load. From: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_stub.c')
-rw-r--r--drivers/char/drm/drm_stub.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c
index 8568a6b373a..b7f2a851f45 100644
--- a/drivers/char/drm/drm_stub.c
+++ b/drivers/char/drm/drm_stub.c
@@ -200,11 +200,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,
- MKDEV(DRM_MAJOR,
- minor),
- &dev->pdev->dev,
- "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");
@@ -317,10 +313,9 @@ 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};
+ *head = (drm_head_t) {.dev = NULL};
drm_heads[minor] = NULL;