aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-10-30 00:07:50 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-10-30 09:29:05 -0400
commita6c2490f010d9235b1424110c6f414460e41dfe1 (patch)
tree2c7d6773739791bfa0510e1ea27e88a3e5ab4cdb
parentdde4ac07263161264d089c7556d0295487787b77 (diff)
Input: struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r--drivers/input/evbug.c6
-rw-r--r--drivers/input/evdev.c2
-rw-r--r--drivers/input/gameport/gameport.c3
-rw-r--r--drivers/input/gameport/ns558.c2
-rw-r--r--drivers/input/input.c4
-rw-r--r--drivers/input/joydev.c2
-rw-r--r--drivers/input/mousedev.c3
-rw-r--r--drivers/input/serio/pcips2.c2
-rw-r--r--drivers/input/serio/serio.c4
-rw-r--r--drivers/input/touchscreen/ads7846.c4
10 files changed, 15 insertions, 17 deletions
diff --git a/drivers/input/evbug.c b/drivers/input/evbug.c
index 0353601ac3b5..f7c5c14ec12a 100644
--- a/drivers/input/evbug.c
+++ b/drivers/input/evbug.c
@@ -39,7 +39,7 @@ MODULE_LICENSE("GPL");
39static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value) 39static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
40{ 40{
41 printk(KERN_DEBUG "evbug.c: Event. Dev: %s, Type: %d, Code: %d, Value: %d\n", 41 printk(KERN_DEBUG "evbug.c: Event. Dev: %s, Type: %d, Code: %d, Value: %d\n",
42 handle->dev->dev.bus_id, type, code, value); 42 dev_name(&handle->dev->dev), type, code, value);
43} 43}
44 44
45static int evbug_connect(struct input_handler *handler, struct input_dev *dev, 45static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
@@ -65,7 +65,7 @@ static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
65 goto err_unregister_handle; 65 goto err_unregister_handle;
66 66
67 printk(KERN_DEBUG "evbug.c: Connected device: %s (%s at %s)\n", 67 printk(KERN_DEBUG "evbug.c: Connected device: %s (%s at %s)\n",
68 dev->dev.bus_id, 68 dev_name(&dev->dev),
69 dev->name ?: "unknown", 69 dev->name ?: "unknown",
70 dev->phys ?: "unknown"); 70 dev->phys ?: "unknown");
71 71
@@ -81,7 +81,7 @@ static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
81static void evbug_disconnect(struct input_handle *handle) 81static void evbug_disconnect(struct input_handle *handle)
82{ 82{
83 printk(KERN_DEBUG "evbug.c: Disconnected device: %s\n", 83 printk(KERN_DEBUG "evbug.c: Disconnected device: %s\n",
84 handle->dev->dev.bus_id); 84 dev_name(&handle->dev->dev));
85 85
86 input_close_device(handle); 86 input_close_device(handle);
87 input_unregister_handle(handle); 87 input_unregister_handle(handle);
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 377b2007377e..c69a58fe54d8 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -820,7 +820,7 @@ static int evdev_connect(struct input_handler *handler, struct input_dev *dev,
820 evdev->handle.handler = handler; 820 evdev->handle.handler = handler;
821 evdev->handle.private = evdev; 821 evdev->handle.private = evdev;
822 822
823 strlcpy(evdev->dev.bus_id, evdev->name, sizeof(evdev->dev.bus_id)); 823 dev_set_name(&evdev->dev, evdev->name);
824 evdev->dev.devt = MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor); 824 evdev->dev.devt = MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor);
825 evdev->dev.class = &input_class; 825 evdev->dev.class = &input_class;
826 evdev->dev.parent = &dev->dev; 826 evdev->dev.parent = &dev->dev;
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
index 2880eaae157a..ebf4be5b7c4e 100644
--- a/drivers/input/gameport/gameport.c
+++ b/drivers/input/gameport/gameport.c
@@ -530,8 +530,7 @@ static void gameport_init_port(struct gameport *gameport)
530 530
531 mutex_init(&gameport->drv_mutex); 531 mutex_init(&gameport->drv_mutex);
532 device_initialize(&gameport->dev); 532 device_initialize(&gameport->dev);
533 snprintf(gameport->dev.bus_id, sizeof(gameport->dev.bus_id), 533 dev_set_name(&gameport->dev, "gameport%lu", (unsigned long)atomic_inc_return(&gameport_no) - 1);
534 "gameport%lu", (unsigned long)atomic_inc_return(&gameport_no) - 1);
535 gameport->dev.bus = &gameport_bus; 534 gameport->dev.bus = &gameport_bus;
536 gameport->dev.release = gameport_release_port; 535 gameport->dev.release = gameport_release_port;
537 if (gameport->parent) 536 if (gameport->parent)
diff --git a/drivers/input/gameport/ns558.c b/drivers/input/gameport/ns558.c
index 2b282cde4b89..db556b71ddda 100644
--- a/drivers/input/gameport/ns558.c
+++ b/drivers/input/gameport/ns558.c
@@ -226,7 +226,7 @@ static int ns558_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *did)
226 ns558->gameport = port; 226 ns558->gameport = port;
227 227
228 gameport_set_name(port, "NS558 PnP Gameport"); 228 gameport_set_name(port, "NS558 PnP Gameport");
229 gameport_set_phys(port, "pnp%s/gameport0", dev->dev.bus_id); 229 gameport_set_phys(port, "pnp%s/gameport0", dev_name(&dev->dev));
230 port->dev.parent = &dev->dev; 230 port->dev.parent = &dev->dev;
231 port->io = ioport; 231 port->io = ioport;
232 232
diff --git a/drivers/input/input.c b/drivers/input/input.c
index c13ced3e0d3d..1730d7331a5d 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1389,8 +1389,8 @@ int input_register_device(struct input_dev *dev)
1389 if (!dev->setkeycode) 1389 if (!dev->setkeycode)
1390 dev->setkeycode = input_default_setkeycode; 1390 dev->setkeycode = input_default_setkeycode;
1391 1391
1392 snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), 1392 dev_set_name(&dev->dev, "input%ld",
1393 "input%ld", (unsigned long) atomic_inc_return(&input_no) - 1); 1393 (unsigned long) atomic_inc_return(&input_no) - 1);
1394 1394
1395 error = device_add(&dev->dev); 1395 error = device_add(&dev->dev);
1396 if (error) 1396 if (error)
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 65d7077a75a1..f9b876bd378d 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -801,7 +801,7 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev,
801 } 801 }
802 } 802 }
803 803
804 strlcpy(joydev->dev.bus_id, joydev->name, sizeof(joydev->dev.bus_id)); 804 dev_set_name(&joydev->dev, joydev->name);
805 joydev->dev.devt = MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor); 805 joydev->dev.devt = MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor);
806 joydev->dev.class = &input_class; 806 joydev->dev.class = &input_class;
807 joydev->dev.parent = &dev->dev; 807 joydev->dev.parent = &dev->dev;
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index 8137e50ded87..4ab8b28bace8 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -879,8 +879,7 @@ static struct mousedev *mousedev_create(struct input_dev *dev,
879 mousedev->handle.handler = handler; 879 mousedev->handle.handler = handler;
880 mousedev->handle.private = mousedev; 880 mousedev->handle.private = mousedev;
881 881
882 strlcpy(mousedev->dev.bus_id, mousedev->name, 882 dev_set_name(&mousedev->dev, mousedev->name);
883 sizeof(mousedev->dev.bus_id));
884 mousedev->dev.class = &input_class; 883 mousedev->dev.class = &input_class;
885 if (dev) 884 if (dev)
886 mousedev->dev.parent = &dev->dev; 885 mousedev->dev.parent = &dev->dev;
diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c
index 1b404f9e3bff..1dacbe0d9348 100644
--- a/drivers/input/serio/pcips2.c
+++ b/drivers/input/serio/pcips2.c
@@ -153,7 +153,7 @@ static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_i
153 serio->open = pcips2_open; 153 serio->open = pcips2_open;
154 serio->close = pcips2_close; 154 serio->close = pcips2_close;
155 strlcpy(serio->name, pci_name(dev), sizeof(serio->name)); 155 strlcpy(serio->name, pci_name(dev), sizeof(serio->name));
156 strlcpy(serio->phys, dev->dev.bus_id, sizeof(serio->phys)); 156 strlcpy(serio->phys, dev_name(&dev->dev), sizeof(serio->phys));
157 serio->port_data = ps2if; 157 serio->port_data = ps2if;
158 serio->dev.parent = &dev->dev; 158 serio->dev.parent = &dev->dev;
159 ps2if->io = serio; 159 ps2if->io = serio;
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index 2f12d60eee3b..bc033250dfcd 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -546,8 +546,8 @@ static void serio_init_port(struct serio *serio)
546 spin_lock_init(&serio->lock); 546 spin_lock_init(&serio->lock);
547 mutex_init(&serio->drv_mutex); 547 mutex_init(&serio->drv_mutex);
548 device_initialize(&serio->dev); 548 device_initialize(&serio->dev);
549 snprintf(serio->dev.bus_id, sizeof(serio->dev.bus_id), 549 dev_set_name(&serio->dev, "serio%ld",
550 "serio%ld", (long)atomic_inc_return(&serio_no) - 1); 550 (long)atomic_inc_return(&serio_no) - 1);
551 serio->dev.bus = &serio_bus; 551 serio->dev.bus = &serio_bus;
552 serio->dev.release = serio_release_port; 552 serio->dev.release = serio_release_port;
553 if (serio->parent) { 553 if (serio->parent) {
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index b9b7fc6ff1eb..6017ea6e994e 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -559,7 +559,7 @@ static void ads7846_rx(void *ads)
559 if (packet->tc.ignore || Rt > ts->pressure_max) { 559 if (packet->tc.ignore || Rt > ts->pressure_max) {
560#ifdef VERBOSE 560#ifdef VERBOSE
561 pr_debug("%s: ignored %d pressure %d\n", 561 pr_debug("%s: ignored %d pressure %d\n",
562 ts->spi->dev.bus_id, packet->tc.ignore, Rt); 562 dev_name(&ts->spi->dev), packet->tc.ignore, Rt);
563#endif 563#endif
564 hrtimer_start(&ts->timer, ktime_set(0, TS_POLL_PERIOD), 564 hrtimer_start(&ts->timer, ktime_set(0, TS_POLL_PERIOD),
565 HRTIMER_MODE_REL); 565 HRTIMER_MODE_REL);
@@ -947,7 +947,7 @@ static int __devinit ads7846_probe(struct spi_device *spi)
947 ts->penirq_recheck_delay_usecs = 947 ts->penirq_recheck_delay_usecs =
948 pdata->penirq_recheck_delay_usecs; 948 pdata->penirq_recheck_delay_usecs;
949 949
950 snprintf(ts->phys, sizeof(ts->phys), "%s/input0", spi->dev.bus_id); 950 snprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(&spi->dev));
951 951
952 input_dev->name = "ADS784x Touchscreen"; 952 input_dev->name = "ADS784x Touchscreen";
953 input_dev->phys = ts->phys; 953 input_dev->phys = ts->phys;