aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_stub.c
diff options
context:
space:
mode:
authorJesse Barnes <jesse.barnes@intel.com>2007-11-21 23:02:38 -0500
committerDave Airlie <airlied@redhat.com>2008-02-07 00:09:38 -0500
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 cdde3c3320fa..2ed7a5c67906 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)
168 goto err_g1; 168 goto err_g1;
169 } 169 }
170 170
171 head->dev_class = drm_sysfs_device_add(drm_class, head); 171 ret = drm_sysfs_device_add(dev, head);
172 if (IS_ERR(head->dev_class)) { 172 if (ret) {
173 printk(KERN_ERR 173 printk(KERN_ERR
174 "DRM: Error sysfs_device_add.\n"); 174 "DRM: Error sysfs_device_add.\n");
175 ret = PTR_ERR(head->dev_class);
176 goto err_g2; 175 goto err_g2;
177 } 176 }
178 *heads = head; 177 *heads = head;
@@ -283,7 +282,7 @@ int drm_put_head(struct drm_head * head)
283 DRM_DEBUG("release secondary minor %d\n", minor); 282 DRM_DEBUG("release secondary minor %d\n", minor);
284 283
285 drm_proc_cleanup(minor, drm_proc_root, head->dev_root); 284 drm_proc_cleanup(minor, drm_proc_root, head->dev_root);
286 drm_sysfs_device_remove(head->dev_class); 285 drm_sysfs_device_remove(head->dev);
287 286
288 *head = (struct drm_head) {.dev = NULL}; 287 *head = (struct drm_head) {.dev = NULL};
289 288