aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/display/display-sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/display/display-sysfs.c')
-rw-r--r--drivers/video/display/display-sysfs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/video/display/display-sysfs.c b/drivers/video/display/display-sysfs.c
index 35477177bef4..6ef800bdf482 100644
--- a/drivers/video/display/display-sysfs.c
+++ b/drivers/video/display/display-sysfs.c
@@ -26,6 +26,7 @@
26#include <linux/ctype.h> 26#include <linux/ctype.h>
27#include <linux/idr.h> 27#include <linux/idr.h>
28#include <linux/err.h> 28#include <linux/err.h>
29#include <linux/kdev_t.h>
29 30
30static ssize_t display_show_name(struct device *dev, 31static ssize_t display_show_name(struct device *dev,
31 struct device_attribute *attr, char *buf) 32 struct device_attribute *attr, char *buf)
@@ -152,10 +153,13 @@ struct display_device *display_device_register(struct display_driver *driver,
152 mutex_unlock(&allocated_dsp_lock); 153 mutex_unlock(&allocated_dsp_lock);
153 154
154 if (!ret) { 155 if (!ret) {
155 new_dev->dev = device_create(display_class, parent, 0, 156 new_dev->dev = device_create_drvdata(display_class,
156 "display%d", new_dev->idx); 157 parent,
158 MKDEV(0,0),
159 new_dev,
160 "display%d",
161 new_dev->idx);
157 if (!IS_ERR(new_dev->dev)) { 162 if (!IS_ERR(new_dev->dev)) {
158 dev_set_drvdata(new_dev->dev, new_dev);
159 new_dev->parent = parent; 163 new_dev->parent = parent;
160 new_dev->driver = driver; 164 new_dev->driver = driver;
161 mutex_init(&new_dev->lock); 165 mutex_init(&new_dev->lock);