aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_sysfs.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-02-13 12:12:52 +1000
committerDave Airlie <airlied@redhat.com>2008-02-13 12:12:52 +1000
commitf276c845bde4c712aa383540a2dd2055ecc00031 (patch)
treeb7b4847cd819cb356e4f13a74326655c7244e7f9 /linux-core/drm_sysfs.c
parent04257f1a5a28550dc430d8051bb58fd0ac34e77d (diff)
drm: re-write minor number allocation to use an idr.
Fixup the minor number allocation scheme to use an idr and move the control nodes up higher.
Diffstat (limited to 'linux-core/drm_sysfs.c')
-rw-r--r--linux-core/drm_sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-core/drm_sysfs.c b/linux-core/drm_sysfs.c
index 114e355e..cd03da8a 100644
--- a/linux-core/drm_sysfs.c
+++ b/linux-core/drm_sysfs.c
@@ -170,11 +170,11 @@ int drm_sysfs_device_add(struct drm_minor *minor)
minor->kdev.release = drm_sysfs_device_release;
minor->kdev.devt = minor->device;
if (minor->type == DRM_MINOR_CONTROL)
- minor_str = "controlD%d";
+ minor_str = "controlD%d";
else
minor_str = "card%d";
- snprintf(minor->kdev.bus_id, BUS_ID_SIZE, minor_str, minor->minor);
+ snprintf(minor->kdev.bus_id, BUS_ID_SIZE, minor_str, minor->index);
err = device_register(&minor->kdev);
if (err) {