aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/input.c6
-rw-r--r--drivers/input/touchscreen/wm97xx-core.c2
-rw-r--r--drivers/input/xen-kbdfront.c8
3 files changed, 11 insertions, 5 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 5d445f48789b..7c237e6ac711 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1265,8 +1265,14 @@ static struct device_type input_dev_type = {
1265 .uevent = input_dev_uevent, 1265 .uevent = input_dev_uevent,
1266}; 1266};
1267 1267
1268static char *input_nodename(struct device *dev)
1269{
1270 return kasprintf(GFP_KERNEL, "input/%s", dev_name(dev));
1271}
1272
1268struct class input_class = { 1273struct class input_class = {
1269 .name = "input", 1274 .name = "input",
1275 .nodename = input_nodename,
1270}; 1276};
1271EXPORT_SYMBOL_GPL(input_class); 1277EXPORT_SYMBOL_GPL(input_class);
1272 1278
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
index 69af8385ab14..2957d48e0045 100644
--- a/drivers/input/touchscreen/wm97xx-core.c
+++ b/drivers/input/touchscreen/wm97xx-core.c
@@ -569,7 +569,7 @@ static int wm97xx_probe(struct device *dev)
569 mutex_init(&wm->codec_mutex); 569 mutex_init(&wm->codec_mutex);
570 570
571 wm->dev = dev; 571 wm->dev = dev;
572 dev->driver_data = wm; 572 dev_set_drvdata(dev, wm);
573 wm->ac97 = to_ac97_t(dev); 573 wm->ac97 = to_ac97_t(dev);
574 574
575 /* check that we have a supported codec */ 575 /* check that we have a supported codec */
diff --git a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c
index 928d2ed8865f..b115726dc088 100644
--- a/drivers/input/xen-kbdfront.c
+++ b/drivers/input/xen-kbdfront.c
@@ -114,7 +114,7 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev,
114 xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure"); 114 xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure");
115 return -ENOMEM; 115 return -ENOMEM;
116 } 116 }
117 dev->dev.driver_data = info; 117 dev_set_drvdata(&dev->dev, info);
118 info->xbdev = dev; 118 info->xbdev = dev;
119 info->irq = -1; 119 info->irq = -1;
120 snprintf(info->phys, sizeof(info->phys), "xenbus/%s", dev->nodename); 120 snprintf(info->phys, sizeof(info->phys), "xenbus/%s", dev->nodename);
@@ -186,7 +186,7 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev,
186 186
187static int xenkbd_resume(struct xenbus_device *dev) 187static int xenkbd_resume(struct xenbus_device *dev)
188{ 188{
189 struct xenkbd_info *info = dev->dev.driver_data; 189 struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
190 190
191 xenkbd_disconnect_backend(info); 191 xenkbd_disconnect_backend(info);
192 memset(info->page, 0, PAGE_SIZE); 192 memset(info->page, 0, PAGE_SIZE);
@@ -195,7 +195,7 @@ static int xenkbd_resume(struct xenbus_device *dev)
195 195
196static int xenkbd_remove(struct xenbus_device *dev) 196static int xenkbd_remove(struct xenbus_device *dev)
197{ 197{
198 struct xenkbd_info *info = dev->dev.driver_data; 198 struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
199 199
200 xenkbd_disconnect_backend(info); 200 xenkbd_disconnect_backend(info);
201 if (info->kbd) 201 if (info->kbd)
@@ -266,7 +266,7 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info)
266static void xenkbd_backend_changed(struct xenbus_device *dev, 266static void xenkbd_backend_changed(struct xenbus_device *dev,
267 enum xenbus_state backend_state) 267 enum xenbus_state backend_state)
268{ 268{
269 struct xenkbd_info *info = dev->dev.driver_data; 269 struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
270 int ret, val; 270 int ret, val;
271 271
272 switch (backend_state) { 272 switch (backend_state) {