diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-11-11 06:07:35 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-11-11 06:07:35 -0500 |
commit | 732052ed3e7539d87136dd833be523747af3fb3e (patch) | |
tree | 7989d3062e50f3edc2a206148c6e776f88e7a2c1 /drivers/char/drm/drm_stub.c | |
parent | e96e33eeb8b876c7ec009c557ca5269328eceda0 (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.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c index 8568a6b373a0..b7f2a851f45c 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) | |||
200 | goto err_g1; | 200 | goto err_g1; |
201 | } | 201 | } |
202 | 202 | ||
203 | head->dev_class = drm_sysfs_device_add(drm_class, | 203 | head->dev_class = drm_sysfs_device_add(drm_class, head); |
204 | MKDEV(DRM_MAJOR, | ||
205 | minor), | ||
206 | &dev->pdev->dev, | ||
207 | "card%d", minor); | ||
208 | if (IS_ERR(head->dev_class)) { | 204 | if (IS_ERR(head->dev_class)) { |
209 | printk(KERN_ERR | 205 | printk(KERN_ERR |
210 | "DRM: Error sysfs_device_add.\n"); | 206 | "DRM: Error sysfs_device_add.\n"); |
@@ -317,10 +313,9 @@ int drm_put_head(drm_head_t * head) | |||
317 | DRM_DEBUG("release secondary minor %d\n", minor); | 313 | DRM_DEBUG("release secondary minor %d\n", minor); |
318 | 314 | ||
319 | drm_proc_cleanup(minor, drm_proc_root, head->dev_root); | 315 | drm_proc_cleanup(minor, drm_proc_root, head->dev_root); |
320 | drm_sysfs_device_remove(MKDEV(DRM_MAJOR, head->minor)); | 316 | drm_sysfs_device_remove(head->dev_class); |
321 | 317 | ||
322 | *head = (drm_head_t) { | 318 | *head = (drm_head_t) {.dev = NULL}; |
323 | .dev = NULL}; | ||
324 | 319 | ||
325 | drm_heads[minor] = NULL; | 320 | drm_heads[minor] = NULL; |
326 | 321 | ||