aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/drm/drm_stub.c
diff options
context:
space:
mode:
authorJesse Barnes <jesse.barnes@intel.com>2007-11-22 14:02:38 +1000
committerDave Airlie <airlied@redhat.com>2008-02-07 15:09:38 +1000
commite8b962b6df50b74afed14af7f7a7d569b3ba70ac (patch)
tree4b40becefb49018a4b02a217673e44637040f4f6 /drivers/char/drm/drm_stub.c
parent8b40958032fd236194de57d29be9cf2c1f2643ee (diff)
drm: update DRM sysfs support
Make DRM devices use real Linux devices instead of class devices, which are going away. While we're at it, clean up some of the interfaces to take struct drm_device * or struct device * and use the global drm_class where needed instead of passing it around. 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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c
index cdde3c3320f..2ed7a5c6790 100644
--- a/drivers/char/drm/drm_stub.c
+++ b/drivers/char/drm/drm_stub.c
@@ -168,11 +168,10 @@ static int drm_get_head(struct drm_device * dev, struct drm_head * head)
goto err_g1;
}
- head->dev_class = drm_sysfs_device_add(drm_class, head);
- if (IS_ERR(head->dev_class)) {
+ ret = drm_sysfs_device_add(dev, head);
+ if (ret) {
printk(KERN_ERR
"DRM: Error sysfs_device_add.\n");
- ret = PTR_ERR(head->dev_class);
goto err_g2;
}
*heads = head;
@@ -283,7 +282,7 @@ int drm_put_head(struct drm_head * head)
DRM_DEBUG("release secondary minor %d\n", minor);
drm_proc_cleanup(minor, drm_proc_root, head->dev_root);
- drm_sysfs_device_remove(head->dev_class);
+ drm_sysfs_device_remove(head->dev);
*head = (struct drm_head) {.dev = NULL};