diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-20 17:20:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-20 17:20:23 -0700 |
commit | 57312b75aa06b09c28acd9c5a9c70827da3696d2 (patch) | |
tree | c35b230739f4b9a8e50b1651854ad830ca2b9fdf /drivers/video/display/display-sysfs.c | |
parent | 1b5e2a7e23439c13f73cacab1cf227f30cb9ae9f (diff) | |
parent | 24b42566c3fcbb5a9011d1446783d0f5844ccd45 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
SCSI: fix race in device_create
USB: Core: fix race in device_create
USB: Phidget: fix race in device_create
s390: fix race in device_create
SOUND: fix race in device_create
UIO: fix race in device_create
Power Supply: fix race in device_create
LEDS: fix race in device_create
IB: fix race in device_create
ide: fix race in device_create
fbdev: fix race in device_create
mm: bdi: fix race in bdi_class device creation
Driver core: add device_create_vargs and device_create_drvdata
Diffstat (limited to 'drivers/video/display/display-sysfs.c')
-rw-r--r-- | drivers/video/display/display-sysfs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/video/display/display-sysfs.c b/drivers/video/display/display-sysfs.c index 35477177bef..6ef800bdf48 100644 --- a/drivers/video/display/display-sysfs.c +++ b/drivers/video/display/display-sysfs.c @@ -26,6 +26,7 @@ #include <linux/ctype.h> #include <linux/idr.h> #include <linux/err.h> +#include <linux/kdev_t.h> static ssize_t display_show_name(struct device *dev, struct device_attribute *attr, char *buf) @@ -152,10 +153,13 @@ struct display_device *display_device_register(struct display_driver *driver, mutex_unlock(&allocated_dsp_lock); if (!ret) { - new_dev->dev = device_create(display_class, parent, 0, - "display%d", new_dev->idx); + new_dev->dev = device_create_drvdata(display_class, + parent, + MKDEV(0,0), + new_dev, + "display%d", + new_dev->idx); if (!IS_ERR(new_dev->dev)) { - dev_set_drvdata(new_dev->dev, new_dev); new_dev->parent = parent; new_dev->driver = driver; mutex_init(&new_dev->lock); |