aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/i8042.c21
-rw-r--r--drivers/input/serio/serio.c22
2 files changed, 14 insertions, 29 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 7e3141f37e32..d365f227ac56 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -255,25 +255,10 @@ static int i8042_kbd_write(struct serio *port, unsigned char c)
255static int i8042_aux_write(struct serio *serio, unsigned char c) 255static int i8042_aux_write(struct serio *serio, unsigned char c)
256{ 256{
257 struct i8042_port *port = serio->port_data; 257 struct i8042_port *port = serio->port_data;
258 int retval;
259
260/*
261 * Send the byte out.
262 */
263
264 if (port->mux == -1)
265 retval = i8042_command(&c, I8042_CMD_AUX_SEND);
266 else
267 retval = i8042_command(&c, I8042_CMD_MUX_SEND + port->mux);
268 258
269/* 259 return i8042_command(&c, port->mux == -1 ?
270 * Make sure the interrupt happens and the character is received even 260 I8042_CMD_AUX_SEND :
271 * in the case the IRQ isn't wired, so that we can receive further 261 I8042_CMD_MUX_SEND + port->mux);
272 * characters later.
273 */
274
275 i8042_interrupt(0, NULL);
276 return retval;
277} 262}
278 263
279/* 264/*
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index 211943f85cb6..3cb99d454ecd 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -784,12 +784,6 @@ static int serio_driver_remove(struct device *dev)
784 return 0; 784 return 0;
785} 785}
786 786
787static struct bus_type serio_bus = {
788 .name = "serio",
789 .probe = serio_driver_probe,
790 .remove = serio_driver_remove,
791};
792
793static void serio_add_driver(struct serio_driver *drv) 787static void serio_add_driver(struct serio_driver *drv)
794{ 788{
795 int error; 789 int error;
@@ -946,15 +940,21 @@ irqreturn_t serio_interrupt(struct serio *serio,
946 return ret; 940 return ret;
947} 941}
948 942
943static struct bus_type serio_bus = {
944 .name = "serio",
945 .dev_attrs = serio_device_attrs,
946 .drv_attrs = serio_driver_attrs,
947 .match = serio_bus_match,
948 .uevent = serio_uevent,
949 .probe = serio_driver_probe,
950 .remove = serio_driver_remove,
951 .resume = serio_resume,
952};
953
949static int __init serio_init(void) 954static int __init serio_init(void)
950{ 955{
951 int error; 956 int error;
952 957
953 serio_bus.dev_attrs = serio_device_attrs;
954 serio_bus.drv_attrs = serio_driver_attrs;
955 serio_bus.match = serio_bus_match;
956 serio_bus.uevent = serio_uevent;
957 serio_bus.resume = serio_resume;
958 error = bus_register(&serio_bus); 958 error = bus_register(&serio_bus);
959 if (error) { 959 if (error) {
960 printk(KERN_ERR "serio: failed to register serio bus, error: %d\n", error); 960 printk(KERN_ERR "serio: failed to register serio bus, error: %d\n", error);