diff options
author | Jeff Garzik <jgarzik@pretzel.yyz.us> | 2005-06-26 23:38:58 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-26 23:38:58 -0400 |
commit | 5696c1944a33b4434a9a1ebb6383b906afd43a10 (patch) | |
tree | 16fbe6ba431bcf949ee8645510b0c2fd39b5810f /drivers/input | |
parent | 66b04a80eea60cabf9d89fd34deb3234a740052f (diff) | |
parent | 020f46a39eb7b99a575b9f4d105fce2b142acdf1 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/evdev.c | 9 | ||||
-rw-r--r-- | drivers/input/gameport/Kconfig | 20 | ||||
-rw-r--r-- | drivers/input/gameport/gameport.c | 8 | ||||
-rw-r--r-- | drivers/input/input.c | 10 | ||||
-rw-r--r-- | drivers/input/joydev.c | 10 | ||||
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 12 | ||||
-rw-r--r-- | drivers/input/mouse/alps.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/psmouse-base.c | 7 | ||||
-rw-r--r-- | drivers/input/mouse/psmouse.h | 4 | ||||
-rw-r--r-- | drivers/input/mouse/synaptics.c | 39 | ||||
-rw-r--r-- | drivers/input/mousedev.c | 31 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 32 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 52 | ||||
-rw-r--r-- | drivers/input/serio/serio.c | 18 | ||||
-rw-r--r-- | drivers/input/serio/serport.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/gunze.c | 3 | ||||
-rw-r--r-- | drivers/input/tsdev.c | 9 |
17 files changed, 128 insertions, 140 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 17552a29978b..556264b43425 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -431,9 +431,9 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct | |||
431 | 431 | ||
432 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), | 432 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), |
433 | S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor); | 433 | S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor); |
434 | class_simple_device_add(input_class, | 434 | class_device_create(input_class, |
435 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), | 435 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), |
436 | dev->dev, "event%d", minor); | 436 | dev->dev, "event%d", minor); |
437 | 437 | ||
438 | return &evdev->handle; | 438 | return &evdev->handle; |
439 | } | 439 | } |
@@ -443,7 +443,8 @@ static void evdev_disconnect(struct input_handle *handle) | |||
443 | struct evdev *evdev = handle->private; | 443 | struct evdev *evdev = handle->private; |
444 | struct evdev_list *list; | 444 | struct evdev_list *list; |
445 | 445 | ||
446 | class_simple_device_remove(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); | 446 | class_device_destroy(input_class, |
447 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); | ||
447 | devfs_remove("input/event%d", evdev->minor); | 448 | devfs_remove("input/event%d", evdev->minor); |
448 | evdev->exist = 0; | 449 | evdev->exist = 0; |
449 | 450 | ||
diff --git a/drivers/input/gameport/Kconfig b/drivers/input/gameport/Kconfig index 6282f460aba0..1d93f5092904 100644 --- a/drivers/input/gameport/Kconfig +++ b/drivers/input/gameport/Kconfig | |||
@@ -68,23 +68,3 @@ config GAMEPORT_CS461X | |||
68 | depends on PCI | 68 | depends on PCI |
69 | 69 | ||
70 | endif | 70 | endif |
71 | |||
72 | # Yes, SOUND_GAMEPORT looks a bit odd. Yes, it ends up being turned on | ||
73 | # in every .config. Please don't touch it. It is here to handle an | ||
74 | # unusual dependency between GAMEPORT and sound drivers. | ||
75 | # | ||
76 | # Some sound drivers call gameport functions. If GAMEPORT is | ||
77 | # not selected, empty stubs are provided for the functions and all is | ||
78 | # well. | ||
79 | # If GAMEPORT is built in, everything is fine. | ||
80 | # If GAMEPORT is a module, however, it would need to be loaded for the | ||
81 | # sound driver to be able to link properly. Therefore, the sound | ||
82 | # driver must be a module as well in that case. Since there's no way | ||
83 | # to express that directly in Kconfig, we use SOUND_GAMEPORT to | ||
84 | # express it. SOUND_GAMEPORT boils down to "if GAMEPORT is 'm', | ||
85 | # anything that depends on SOUND_GAMEPORT must be 'm' as well. if | ||
86 | # GAMEPORT is 'y' or 'n', it can be anything". | ||
87 | config SOUND_GAMEPORT | ||
88 | tristate | ||
89 | default m if GAMEPORT=m | ||
90 | default y | ||
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index f20c3f23388b..c77a82e46055 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c | |||
@@ -134,7 +134,7 @@ static int gameport_measure_speed(struct gameport *gameport) | |||
134 | } | 134 | } |
135 | 135 | ||
136 | gameport_close(gameport); | 136 | gameport_close(gameport); |
137 | return (cpu_data[_smp_processor_id()].loops_per_jiffy * (unsigned long)HZ / (1000 / 50)) / (tx < 1 ? 1 : tx); | 137 | return (cpu_data[raw_smp_processor_id()].loops_per_jiffy * (unsigned long)HZ / (1000 / 50)) / (tx < 1 ? 1 : tx); |
138 | 138 | ||
139 | #else | 139 | #else |
140 | 140 | ||
@@ -439,7 +439,7 @@ static int gameport_thread(void *nothing) | |||
439 | do { | 439 | do { |
440 | gameport_handle_events(); | 440 | gameport_handle_events(); |
441 | wait_event_interruptible(gameport_wait, !list_empty(&gameport_event_list)); | 441 | wait_event_interruptible(gameport_wait, !list_empty(&gameport_event_list)); |
442 | try_to_freeze(PF_FREEZE); | 442 | try_to_freeze(); |
443 | } while (!signal_pending(current)); | 443 | } while (!signal_pending(current)); |
444 | 444 | ||
445 | printk(KERN_DEBUG "gameport: kgameportd exiting\n"); | 445 | printk(KERN_DEBUG "gameport: kgameportd exiting\n"); |
@@ -453,13 +453,13 @@ static int gameport_thread(void *nothing) | |||
453 | * Gameport port operations | 453 | * Gameport port operations |
454 | */ | 454 | */ |
455 | 455 | ||
456 | static ssize_t gameport_show_description(struct device *dev, char *buf) | 456 | static ssize_t gameport_show_description(struct device *dev, struct device_attribute *attr, char *buf) |
457 | { | 457 | { |
458 | struct gameport *gameport = to_gameport_port(dev); | 458 | struct gameport *gameport = to_gameport_port(dev); |
459 | return sprintf(buf, "%s\n", gameport->name); | 459 | return sprintf(buf, "%s\n", gameport->name); |
460 | } | 460 | } |
461 | 461 | ||
462 | static ssize_t gameport_rebind_driver(struct device *dev, const char *buf, size_t count) | 462 | static ssize_t gameport_rebind_driver(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
463 | { | 463 | { |
464 | struct gameport *gameport = to_gameport_port(dev); | 464 | struct gameport *gameport = to_gameport_port(dev); |
465 | struct device_driver *drv; | 465 | struct device_driver *drv; |
diff --git a/drivers/input/input.c b/drivers/input/input.c index 3385dd03abfc..83c77c990dda 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -702,13 +702,13 @@ static int __init input_proc_init(void) | |||
702 | static inline int input_proc_init(void) { return 0; } | 702 | static inline int input_proc_init(void) { return 0; } |
703 | #endif | 703 | #endif |
704 | 704 | ||
705 | struct class_simple *input_class; | 705 | struct class *input_class; |
706 | 706 | ||
707 | static int __init input_init(void) | 707 | static int __init input_init(void) |
708 | { | 708 | { |
709 | int retval = -ENOMEM; | 709 | int retval = -ENOMEM; |
710 | 710 | ||
711 | input_class = class_simple_create(THIS_MODULE, "input"); | 711 | input_class = class_create(THIS_MODULE, "input"); |
712 | if (IS_ERR(input_class)) | 712 | if (IS_ERR(input_class)) |
713 | return PTR_ERR(input_class); | 713 | return PTR_ERR(input_class); |
714 | input_proc_init(); | 714 | input_proc_init(); |
@@ -718,7 +718,7 @@ static int __init input_init(void) | |||
718 | remove_proc_entry("devices", proc_bus_input_dir); | 718 | remove_proc_entry("devices", proc_bus_input_dir); |
719 | remove_proc_entry("handlers", proc_bus_input_dir); | 719 | remove_proc_entry("handlers", proc_bus_input_dir); |
720 | remove_proc_entry("input", proc_bus); | 720 | remove_proc_entry("input", proc_bus); |
721 | class_simple_destroy(input_class); | 721 | class_destroy(input_class); |
722 | return retval; | 722 | return retval; |
723 | } | 723 | } |
724 | 724 | ||
@@ -728,7 +728,7 @@ static int __init input_init(void) | |||
728 | remove_proc_entry("handlers", proc_bus_input_dir); | 728 | remove_proc_entry("handlers", proc_bus_input_dir); |
729 | remove_proc_entry("input", proc_bus); | 729 | remove_proc_entry("input", proc_bus); |
730 | unregister_chrdev(INPUT_MAJOR, "input"); | 730 | unregister_chrdev(INPUT_MAJOR, "input"); |
731 | class_simple_destroy(input_class); | 731 | class_destroy(input_class); |
732 | } | 732 | } |
733 | return retval; | 733 | return retval; |
734 | } | 734 | } |
@@ -741,7 +741,7 @@ static void __exit input_exit(void) | |||
741 | 741 | ||
742 | devfs_remove("input"); | 742 | devfs_remove("input"); |
743 | unregister_chrdev(INPUT_MAJOR, "input"); | 743 | unregister_chrdev(INPUT_MAJOR, "input"); |
744 | class_simple_destroy(input_class); | 744 | class_destroy(input_class); |
745 | } | 745 | } |
746 | 746 | ||
747 | subsys_initcall(input_init); | 747 | subsys_initcall(input_init); |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 7d7527f8b02d..39775fc380c7 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -422,7 +422,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct | |||
422 | joydev->nkey++; | 422 | joydev->nkey++; |
423 | } | 423 | } |
424 | 424 | ||
425 | for (i = 0; i < BTN_JOYSTICK - BTN_MISC + 1; i++) | 425 | for (i = 0; i < BTN_JOYSTICK - BTN_MISC; i++) |
426 | if (test_bit(i + BTN_MISC, dev->keybit)) { | 426 | if (test_bit(i + BTN_MISC, dev->keybit)) { |
427 | joydev->keymap[i] = joydev->nkey; | 427 | joydev->keymap[i] = joydev->nkey; |
428 | joydev->keypam[joydev->nkey] = i + BTN_MISC; | 428 | joydev->keypam[joydev->nkey] = i + BTN_MISC; |
@@ -452,9 +452,9 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct | |||
452 | 452 | ||
453 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), | 453 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), |
454 | S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor); | 454 | S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor); |
455 | class_simple_device_add(input_class, | 455 | class_device_create(input_class, |
456 | MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), | 456 | MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), |
457 | dev->dev, "js%d", minor); | 457 | dev->dev, "js%d", minor); |
458 | 458 | ||
459 | return &joydev->handle; | 459 | return &joydev->handle; |
460 | } | 460 | } |
@@ -464,7 +464,7 @@ static void joydev_disconnect(struct input_handle *handle) | |||
464 | struct joydev *joydev = handle->private; | 464 | struct joydev *joydev = handle->private; |
465 | struct joydev_list *list; | 465 | struct joydev_list *list; |
466 | 466 | ||
467 | class_simple_device_remove(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor)); | 467 | class_device_destroy(input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor)); |
468 | devfs_remove("input/js%d", joydev->minor); | 468 | devfs_remove("input/js%d", joydev->minor); |
469 | joydev->exist = 0; | 469 | joydev->exist = 0; |
470 | 470 | ||
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 79c332f16fc7..82fad9a23ace 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -54,7 +54,7 @@ static int atkbd_softraw = 1; | |||
54 | module_param_named(softraw, atkbd_softraw, bool, 0); | 54 | module_param_named(softraw, atkbd_softraw, bool, 0); |
55 | MODULE_PARM_DESC(softraw, "Use software generated rawmode"); | 55 | MODULE_PARM_DESC(softraw, "Use software generated rawmode"); |
56 | 56 | ||
57 | static int atkbd_scroll = 1; | 57 | static int atkbd_scroll = 0; |
58 | module_param_named(scroll, atkbd_scroll, bool, 0); | 58 | module_param_named(scroll, atkbd_scroll, bool, 0); |
59 | MODULE_PARM_DESC(scroll, "Enable scroll-wheel on MS Office and similar keyboards"); | 59 | MODULE_PARM_DESC(scroll, "Enable scroll-wheel on MS Office and similar keyboards"); |
60 | 60 | ||
@@ -171,9 +171,9 @@ static struct { | |||
171 | unsigned char set2; | 171 | unsigned char set2; |
172 | } atkbd_scroll_keys[] = { | 172 | } atkbd_scroll_keys[] = { |
173 | { ATKBD_SCR_1, 0xc5 }, | 173 | { ATKBD_SCR_1, 0xc5 }, |
174 | { ATKBD_SCR_2, 0xa9 }, | 174 | { ATKBD_SCR_2, 0x9d }, |
175 | { ATKBD_SCR_4, 0xb6 }, | 175 | { ATKBD_SCR_4, 0xa4 }, |
176 | { ATKBD_SCR_8, 0xa7 }, | 176 | { ATKBD_SCR_8, 0x9b }, |
177 | { ATKBD_SCR_CLICK, 0xe0 }, | 177 | { ATKBD_SCR_CLICK, 0xe0 }, |
178 | { ATKBD_SCR_LEFT, 0xcb }, | 178 | { ATKBD_SCR_LEFT, 0xcb }, |
179 | { ATKBD_SCR_RIGHT, 0xd2 }, | 179 | { ATKBD_SCR_RIGHT, 0xd2 }, |
@@ -219,11 +219,11 @@ static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t | |||
219 | #define ATKBD_DEFINE_ATTR(_name) \ | 219 | #define ATKBD_DEFINE_ATTR(_name) \ |
220 | static ssize_t atkbd_show_##_name(struct atkbd *, char *); \ | 220 | static ssize_t atkbd_show_##_name(struct atkbd *, char *); \ |
221 | static ssize_t atkbd_set_##_name(struct atkbd *, const char *, size_t); \ | 221 | static ssize_t atkbd_set_##_name(struct atkbd *, const char *, size_t); \ |
222 | static ssize_t atkbd_do_show_##_name(struct device *d, char *b) \ | 222 | static ssize_t atkbd_do_show_##_name(struct device *d, struct device_attribute *attr, char *b) \ |
223 | { \ | 223 | { \ |
224 | return atkbd_attr_show_helper(d, b, atkbd_show_##_name); \ | 224 | return atkbd_attr_show_helper(d, b, atkbd_show_##_name); \ |
225 | } \ | 225 | } \ |
226 | static ssize_t atkbd_do_set_##_name(struct device *d, const char *b, size_t s) \ | 226 | static ssize_t atkbd_do_set_##_name(struct device *d, struct device_attribute *attr, const char *b, size_t s) \ |
227 | { \ | 227 | { \ |
228 | return atkbd_attr_set_helper(d, b, s, atkbd_set_##_name); \ | 228 | return atkbd_attr_set_helper(d, b, s, atkbd_set_##_name); \ |
229 | } \ | 229 | } \ |
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 42a9f7f6f8cb..7bf4be733e9a 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -352,7 +352,7 @@ static int alps_reconnect(struct psmouse *psmouse) | |||
352 | if (alps_get_status(psmouse, param)) | 352 | if (alps_get_status(psmouse, param)) |
353 | return -1; | 353 | return -1; |
354 | 354 | ||
355 | if (param[0] & 0x04) | 355 | if (!(param[0] & 0x04)) |
356 | alps_tap_mode(psmouse, 1); | 356 | alps_tap_mode(psmouse, 1); |
357 | 357 | ||
358 | if (alps_absolute_mode(psmouse)) { | 358 | if (alps_absolute_mode(psmouse)) { |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index cd8509549eac..019034b21a0b 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -518,13 +518,16 @@ static int psmouse_probe(struct psmouse *psmouse) | |||
518 | /* | 518 | /* |
519 | * First, we check if it's a mouse. It should send 0x00 or 0x03 | 519 | * First, we check if it's a mouse. It should send 0x00 or 0x03 |
520 | * in case of an IntelliMouse in 4-byte mode or 0x04 for IM Explorer. | 520 | * in case of an IntelliMouse in 4-byte mode or 0x04 for IM Explorer. |
521 | * Sunrex K8561 IR Keyboard/Mouse reports 0xff on second and subsequent | ||
522 | * ID queries, probably due to a firmware bug. | ||
521 | */ | 523 | */ |
522 | 524 | ||
523 | param[0] = 0xa5; | 525 | param[0] = 0xa5; |
524 | if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID)) | 526 | if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID)) |
525 | return -1; | 527 | return -1; |
526 | 528 | ||
527 | if (param[0] != 0x00 && param[0] != 0x03 && param[0] != 0x04) | 529 | if (param[0] != 0x00 && param[0] != 0x03 && |
530 | param[0] != 0x04 && param[0] != 0xff) | ||
528 | return -1; | 531 | return -1; |
529 | 532 | ||
530 | /* | 533 | /* |
@@ -972,7 +975,7 @@ static int psmouse_set_maxproto(const char *val, struct kernel_param *kp) | |||
972 | return -EINVAL; | 975 | return -EINVAL; |
973 | 976 | ||
974 | if (!strncmp(val, "any", 3)) { | 977 | if (!strncmp(val, "any", 3)) { |
975 | *((unsigned int *)kp->arg) = -1UL; | 978 | *((unsigned int *)kp->arg) = -1U; |
976 | return 0; | 979 | return 0; |
977 | } | 980 | } |
978 | 981 | ||
diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h index bda5b065d03c..79e17a0c4664 100644 --- a/drivers/input/mouse/psmouse.h +++ b/drivers/input/mouse/psmouse.h | |||
@@ -91,11 +91,11 @@ ssize_t psmouse_attr_set_helper(struct device *dev, const char *buf, size_t coun | |||
91 | #define PSMOUSE_DEFINE_ATTR(_name) \ | 91 | #define PSMOUSE_DEFINE_ATTR(_name) \ |
92 | static ssize_t psmouse_attr_show_##_name(struct psmouse *, char *); \ | 92 | static ssize_t psmouse_attr_show_##_name(struct psmouse *, char *); \ |
93 | static ssize_t psmouse_attr_set_##_name(struct psmouse *, const char *, size_t);\ | 93 | static ssize_t psmouse_attr_set_##_name(struct psmouse *, const char *, size_t);\ |
94 | static ssize_t psmouse_do_show_##_name(struct device *d, char *b) \ | 94 | static ssize_t psmouse_do_show_##_name(struct device *d, struct device_attribute *attr, char *b) \ |
95 | { \ | 95 | { \ |
96 | return psmouse_attr_show_helper(d, b, psmouse_attr_show_##_name); \ | 96 | return psmouse_attr_show_helper(d, b, psmouse_attr_show_##_name); \ |
97 | } \ | 97 | } \ |
98 | static ssize_t psmouse_do_set_##_name(struct device *d, const char *b, size_t s)\ | 98 | static ssize_t psmouse_do_set_##_name(struct device *d, struct device_attribute *attr, const char *b, size_t s)\ |
99 | { \ | 99 | { \ |
100 | return psmouse_attr_set_helper(d, b, s, psmouse_attr_set_##_name); \ | 100 | return psmouse_attr_set_helper(d, b, s, psmouse_attr_set_##_name); \ |
101 | } \ | 101 | } \ |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 69832f8fb720..36c721227b68 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -143,39 +143,6 @@ static int synaptics_identify(struct psmouse *psmouse) | |||
143 | return -1; | 143 | return -1; |
144 | } | 144 | } |
145 | 145 | ||
146 | static void print_ident(struct synaptics_data *priv) | ||
147 | { | ||
148 | printk(KERN_INFO "Synaptics Touchpad, model: %ld\n", SYN_ID_MODEL(priv->identity)); | ||
149 | printk(KERN_INFO " Firmware: %ld.%ld\n", SYN_ID_MAJOR(priv->identity), | ||
150 | SYN_ID_MINOR(priv->identity)); | ||
151 | if (SYN_MODEL_ROT180(priv->model_id)) | ||
152 | printk(KERN_INFO " 180 degree mounted touchpad\n"); | ||
153 | if (SYN_MODEL_PORTRAIT(priv->model_id)) | ||
154 | printk(KERN_INFO " portrait touchpad\n"); | ||
155 | printk(KERN_INFO " Sensor: %ld\n", SYN_MODEL_SENSOR(priv->model_id)); | ||
156 | if (SYN_MODEL_NEWABS(priv->model_id)) | ||
157 | printk(KERN_INFO " new absolute packet format\n"); | ||
158 | if (SYN_MODEL_PEN(priv->model_id)) | ||
159 | printk(KERN_INFO " pen detection\n"); | ||
160 | |||
161 | if (SYN_CAP_EXTENDED(priv->capabilities)) { | ||
162 | printk(KERN_INFO " Touchpad has extended capability bits\n"); | ||
163 | if (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap)) | ||
164 | printk(KERN_INFO " -> %d multi-buttons, i.e. besides standard buttons\n", | ||
165 | (int)(SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap))); | ||
166 | if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities)) | ||
167 | printk(KERN_INFO " -> middle button\n"); | ||
168 | if (SYN_CAP_FOUR_BUTTON(priv->capabilities)) | ||
169 | printk(KERN_INFO " -> four buttons\n"); | ||
170 | if (SYN_CAP_MULTIFINGER(priv->capabilities)) | ||
171 | printk(KERN_INFO " -> multifinger detection\n"); | ||
172 | if (SYN_CAP_PALMDETECT(priv->capabilities)) | ||
173 | printk(KERN_INFO " -> palm detection\n"); | ||
174 | if (SYN_CAP_PASS_THROUGH(priv->capabilities)) | ||
175 | printk(KERN_INFO " -> pass-through port\n"); | ||
176 | } | ||
177 | } | ||
178 | |||
179 | static int synaptics_query_hardware(struct psmouse *psmouse) | 146 | static int synaptics_query_hardware(struct psmouse *psmouse) |
180 | { | 147 | { |
181 | int retries = 0; | 148 | int retries = 0; |
@@ -666,7 +633,11 @@ int synaptics_init(struct psmouse *psmouse) | |||
666 | 633 | ||
667 | priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS; | 634 | priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS; |
668 | 635 | ||
669 | print_ident(priv); | 636 | printk(KERN_INFO "Synaptics Touchpad, model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx\n", |
637 | SYN_ID_MODEL(priv->identity), | ||
638 | SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity), | ||
639 | priv->model_id, priv->capabilities, priv->ext_cap); | ||
640 | |||
670 | set_input_params(&psmouse->dev, priv); | 641 | set_input_params(&psmouse->dev, priv); |
671 | 642 | ||
672 | psmouse->protocol_handler = synaptics_process_byte; | 643 | psmouse->protocol_handler = synaptics_process_byte; |
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 564974ce5793..062848ac7e6b 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -101,6 +101,7 @@ struct mousedev_list { | |||
101 | unsigned char ready, buffer, bufsiz; | 101 | unsigned char ready, buffer, bufsiz; |
102 | unsigned char imexseq, impsseq; | 102 | unsigned char imexseq, impsseq; |
103 | enum mousedev_emul mode; | 103 | enum mousedev_emul mode; |
104 | unsigned long last_buttons; | ||
104 | }; | 105 | }; |
105 | 106 | ||
106 | #define MOUSEDEV_SEQ_LEN 6 | 107 | #define MOUSEDEV_SEQ_LEN 6 |
@@ -224,7 +225,7 @@ static void mousedev_notify_readers(struct mousedev *mousedev, struct mousedev_h | |||
224 | spin_lock_irqsave(&list->packet_lock, flags); | 225 | spin_lock_irqsave(&list->packet_lock, flags); |
225 | 226 | ||
226 | p = &list->packets[list->head]; | 227 | p = &list->packets[list->head]; |
227 | if (list->ready && p->buttons != packet->buttons) { | 228 | if (list->ready && p->buttons != mousedev->packet.buttons) { |
228 | unsigned int new_head = (list->head + 1) % PACKET_QUEUE_LEN; | 229 | unsigned int new_head = (list->head + 1) % PACKET_QUEUE_LEN; |
229 | if (new_head != list->tail) { | 230 | if (new_head != list->tail) { |
230 | p = &list->packets[list->head = new_head]; | 231 | p = &list->packets[list->head = new_head]; |
@@ -249,10 +250,13 @@ static void mousedev_notify_readers(struct mousedev *mousedev, struct mousedev_h | |||
249 | p->dz += packet->dz; | 250 | p->dz += packet->dz; |
250 | p->buttons = mousedev->packet.buttons; | 251 | p->buttons = mousedev->packet.buttons; |
251 | 252 | ||
252 | list->ready = 1; | 253 | if (p->dx || p->dy || p->dz || p->buttons != list->last_buttons) |
254 | list->ready = 1; | ||
253 | 255 | ||
254 | spin_unlock_irqrestore(&list->packet_lock, flags); | 256 | spin_unlock_irqrestore(&list->packet_lock, flags); |
255 | kill_fasync(&list->fasync, SIGIO, POLL_IN); | 257 | |
258 | if (list->ready) | ||
259 | kill_fasync(&list->fasync, SIGIO, POLL_IN); | ||
256 | } | 260 | } |
257 | 261 | ||
258 | wake_up_interruptible(&mousedev->wait); | 262 | wake_up_interruptible(&mousedev->wait); |
@@ -477,9 +481,10 @@ static void mousedev_packet(struct mousedev_list *list, signed char *ps2_data) | |||
477 | } | 481 | } |
478 | 482 | ||
479 | if (!p->dx && !p->dy && !p->dz) { | 483 | if (!p->dx && !p->dy && !p->dz) { |
480 | if (list->tail == list->head) | 484 | if (list->tail == list->head) { |
481 | list->ready = 0; | 485 | list->ready = 0; |
482 | else | 486 | list->last_buttons = p->buttons; |
487 | } else | ||
483 | list->tail = (list->tail + 1) % PACKET_QUEUE_LEN; | 488 | list->tail = (list->tail + 1) % PACKET_QUEUE_LEN; |
484 | } | 489 | } |
485 | 490 | ||
@@ -642,9 +647,9 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru | |||
642 | 647 | ||
643 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), | 648 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), |
644 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor); | 649 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor); |
645 | class_simple_device_add(input_class, | 650 | class_device_create(input_class, |
646 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), | 651 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), |
647 | dev->dev, "mouse%d", minor); | 652 | dev->dev, "mouse%d", minor); |
648 | 653 | ||
649 | return &mousedev->handle; | 654 | return &mousedev->handle; |
650 | } | 655 | } |
@@ -654,7 +659,8 @@ static void mousedev_disconnect(struct input_handle *handle) | |||
654 | struct mousedev *mousedev = handle->private; | 659 | struct mousedev *mousedev = handle->private; |
655 | struct mousedev_list *list; | 660 | struct mousedev_list *list; |
656 | 661 | ||
657 | class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor)); | 662 | class_device_destroy(input_class, |
663 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor)); | ||
658 | devfs_remove("input/mouse%d", mousedev->minor); | 664 | devfs_remove("input/mouse%d", mousedev->minor); |
659 | mousedev->exist = 0; | 665 | mousedev->exist = 0; |
660 | 666 | ||
@@ -730,8 +736,8 @@ static int __init mousedev_init(void) | |||
730 | 736 | ||
731 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), | 737 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), |
732 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mice"); | 738 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mice"); |
733 | class_simple_device_add(input_class, MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), | 739 | class_device_create(input_class, |
734 | NULL, "mice"); | 740 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), NULL, "mice"); |
735 | 741 | ||
736 | #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX | 742 | #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX |
737 | if (!(psaux_registered = !misc_register(&psaux_mouse))) | 743 | if (!(psaux_registered = !misc_register(&psaux_mouse))) |
@@ -750,7 +756,8 @@ static void __exit mousedev_exit(void) | |||
750 | misc_deregister(&psaux_mouse); | 756 | misc_deregister(&psaux_mouse); |
751 | #endif | 757 | #endif |
752 | devfs_remove("input/mice"); | 758 | devfs_remove("input/mice"); |
753 | class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX)); | 759 | class_device_destroy(input_class, |
760 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX)); | ||
754 | input_unregister_handler(&mousedev_handler); | 761 | input_unregister_handler(&mousedev_handler); |
755 | } | 762 | } |
756 | 763 | ||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index f64867808fea..0487ecbb8a49 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -88,9 +88,11 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
88 | }; | 88 | }; |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Some Fujitsu notebooks are ahving trouble with touhcpads if | 91 | * Some Fujitsu notebooks are having trouble with touchpads if |
92 | * active multiplexing mode is activated. Luckily they don't have | 92 | * active multiplexing mode is activated. Luckily they don't have |
93 | * external PS/2 ports so we can safely disable it. | 93 | * external PS/2 ports so we can safely disable it. |
94 | * ... apparently some Toshibas don't like MUX mode either and | ||
95 | * die horrible death on reboot. | ||
94 | */ | 96 | */ |
95 | static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | 97 | static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { |
96 | { | 98 | { |
@@ -115,12 +117,26 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
115 | }, | 117 | }, |
116 | }, | 118 | }, |
117 | { | 119 | { |
120 | .ident = "Fujitsu Lifebook S6230", | ||
121 | .matches = { | ||
122 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | ||
123 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"), | ||
124 | }, | ||
125 | }, | ||
126 | { | ||
118 | .ident = "Fujitsu T70H", | 127 | .ident = "Fujitsu T70H", |
119 | .matches = { | 128 | .matches = { |
120 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | 129 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), |
121 | DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"), | 130 | DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"), |
122 | }, | 131 | }, |
123 | }, | 132 | }, |
133 | { | ||
134 | .ident = "Toshiba P10", | ||
135 | .matches = { | ||
136 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
137 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"), | ||
138 | }, | ||
139 | }, | ||
124 | { } | 140 | { } |
125 | }; | 141 | }; |
126 | 142 | ||
@@ -215,11 +231,15 @@ static struct pnp_driver i8042_pnp_aux_driver = { | |||
215 | 231 | ||
216 | static void i8042_pnp_exit(void) | 232 | static void i8042_pnp_exit(void) |
217 | { | 233 | { |
218 | if (i8042_pnp_kbd_registered) | 234 | if (i8042_pnp_kbd_registered) { |
235 | i8042_pnp_kbd_registered = 0; | ||
219 | pnp_unregister_driver(&i8042_pnp_kbd_driver); | 236 | pnp_unregister_driver(&i8042_pnp_kbd_driver); |
237 | } | ||
220 | 238 | ||
221 | if (i8042_pnp_aux_registered) | 239 | if (i8042_pnp_aux_registered) { |
240 | i8042_pnp_aux_registered = 0; | ||
222 | pnp_unregister_driver(&i8042_pnp_aux_driver); | 241 | pnp_unregister_driver(&i8042_pnp_aux_driver); |
242 | } | ||
223 | } | 243 | } |
224 | 244 | ||
225 | static int i8042_pnp_init(void) | 245 | static int i8042_pnp_init(void) |
@@ -227,7 +247,7 @@ static int i8042_pnp_init(void) | |||
227 | int result_kbd, result_aux; | 247 | int result_kbd, result_aux; |
228 | 248 | ||
229 | if (i8042_nopnp) { | 249 | if (i8042_nopnp) { |
230 | printk("i8042: PNP detection disabled\n"); | 250 | printk(KERN_INFO "i8042: PNP detection disabled\n"); |
231 | return 0; | 251 | return 0; |
232 | } | 252 | } |
233 | 253 | ||
@@ -241,7 +261,7 @@ static int i8042_pnp_init(void) | |||
241 | #if defined(__ia64__) | 261 | #if defined(__ia64__) |
242 | return -ENODEV; | 262 | return -ENODEV; |
243 | #else | 263 | #else |
244 | printk(KERN_WARNING "PNP: No PS/2 controller found. Probing ports directly.\n"); | 264 | printk(KERN_INFO "PNP: No PS/2 controller found. Probing ports directly.\n"); |
245 | return 0; | 265 | return 0; |
246 | #endif | 266 | #endif |
247 | } | 267 | } |
@@ -265,7 +285,7 @@ static int i8042_pnp_init(void) | |||
265 | i8042_pnp_kbd_irq = i8042_kbd_irq; | 285 | i8042_pnp_kbd_irq = i8042_kbd_irq; |
266 | } | 286 | } |
267 | 287 | ||
268 | if (result_aux > 0 && !i8042_pnp_aux_irq) { | 288 | if (!i8042_pnp_aux_irq) { |
269 | printk(KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %#x\n", i8042_aux_irq); | 289 | printk(KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %#x\n", i8042_aux_irq); |
270 | i8042_pnp_aux_irq = i8042_aux_irq; | 290 | i8042_pnp_aux_irq = i8042_aux_irq; |
271 | } | 291 | } |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 8e63e464d361..a9bf549c8dc5 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -396,7 +396,7 @@ static void i8042_stop(struct serio *serio) | |||
396 | struct i8042_port *port = serio->port_data; | 396 | struct i8042_port *port = serio->port_data; |
397 | 397 | ||
398 | port->exists = 0; | 398 | port->exists = 0; |
399 | synchronize_kernel(); | 399 | synchronize_sched(); |
400 | port->serio = NULL; | 400 | port->serio = NULL; |
401 | } | 401 | } |
402 | 402 | ||
@@ -698,6 +698,26 @@ static void i8042_timer_func(unsigned long data) | |||
698 | i8042_interrupt(0, NULL, NULL); | 698 | i8042_interrupt(0, NULL, NULL); |
699 | } | 699 | } |
700 | 700 | ||
701 | static int i8042_ctl_test(void) | ||
702 | { | ||
703 | unsigned char param; | ||
704 | |||
705 | if (!i8042_reset) | ||
706 | return 0; | ||
707 | |||
708 | if (i8042_command(¶m, I8042_CMD_CTL_TEST)) { | ||
709 | printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n"); | ||
710 | return -1; | ||
711 | } | ||
712 | |||
713 | if (param != I8042_RET_CTL_TEST) { | ||
714 | printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n", | ||
715 | param, I8042_RET_CTL_TEST); | ||
716 | return -1; | ||
717 | } | ||
718 | |||
719 | return 0; | ||
720 | } | ||
701 | 721 | ||
702 | /* | 722 | /* |
703 | * i8042_controller init initializes the i8042 controller, and, | 723 | * i8042_controller init initializes the i8042 controller, and, |
@@ -719,21 +739,8 @@ static int i8042_controller_init(void) | |||
719 | return -1; | 739 | return -1; |
720 | } | 740 | } |
721 | 741 | ||
722 | if (i8042_reset) { | 742 | if (i8042_ctl_test()) |
723 | 743 | return -1; | |
724 | unsigned char param; | ||
725 | |||
726 | if (i8042_command(¶m, I8042_CMD_CTL_TEST)) { | ||
727 | printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n"); | ||
728 | return -1; | ||
729 | } | ||
730 | |||
731 | if (param != I8042_RET_CTL_TEST) { | ||
732 | printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n", | ||
733 | param, I8042_RET_CTL_TEST); | ||
734 | return -1; | ||
735 | } | ||
736 | } | ||
737 | 744 | ||
738 | /* | 745 | /* |
739 | * Save the CTR for restoral on unload / reboot. | 746 | * Save the CTR for restoral on unload / reboot. |
@@ -802,15 +809,11 @@ static int i8042_controller_init(void) | |||
802 | */ | 809 | */ |
803 | static void i8042_controller_reset(void) | 810 | static void i8042_controller_reset(void) |
804 | { | 811 | { |
805 | unsigned char param; | ||
806 | |||
807 | /* | 812 | /* |
808 | * Reset the controller if requested. | 813 | * Reset the controller if requested. |
809 | */ | 814 | */ |
810 | 815 | ||
811 | if (i8042_reset) | 816 | i8042_ctl_test(); |
812 | if (i8042_command(¶m, I8042_CMD_CTL_TEST)) | ||
813 | printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n"); | ||
814 | 817 | ||
815 | /* | 818 | /* |
816 | * Disable MUX mode if present. | 819 | * Disable MUX mode if present. |
@@ -922,8 +925,11 @@ static int i8042_resume(struct device *dev, u32 level) | |||
922 | if (level != RESUME_ENABLE) | 925 | if (level != RESUME_ENABLE) |
923 | return 0; | 926 | return 0; |
924 | 927 | ||
925 | if (i8042_controller_init()) { | 928 | if (i8042_ctl_test()) |
926 | printk(KERN_ERR "i8042: resume failed\n"); | 929 | return -1; |
930 | |||
931 | if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { | ||
932 | printk(KERN_ERR "i8042: Can't write CTR\n"); | ||
927 | return -1; | 933 | return -1; |
928 | } | 934 | } |
929 | 935 | ||
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 0beacb77ee18..341824c48529 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c | |||
@@ -344,7 +344,7 @@ static int serio_thread(void *nothing) | |||
344 | do { | 344 | do { |
345 | serio_handle_events(); | 345 | serio_handle_events(); |
346 | wait_event_interruptible(serio_wait, !list_empty(&serio_event_list)); | 346 | wait_event_interruptible(serio_wait, !list_empty(&serio_event_list)); |
347 | try_to_freeze(PF_FREEZE); | 347 | try_to_freeze(); |
348 | } while (!signal_pending(current)); | 348 | } while (!signal_pending(current)); |
349 | 349 | ||
350 | printk(KERN_DEBUG "serio: kseriod exiting\n"); | 350 | printk(KERN_DEBUG "serio: kseriod exiting\n"); |
@@ -358,31 +358,31 @@ static int serio_thread(void *nothing) | |||
358 | * Serio port operations | 358 | * Serio port operations |
359 | */ | 359 | */ |
360 | 360 | ||
361 | static ssize_t serio_show_description(struct device *dev, char *buf) | 361 | static ssize_t serio_show_description(struct device *dev, struct device_attribute *attr, char *buf) |
362 | { | 362 | { |
363 | struct serio *serio = to_serio_port(dev); | 363 | struct serio *serio = to_serio_port(dev); |
364 | return sprintf(buf, "%s\n", serio->name); | 364 | return sprintf(buf, "%s\n", serio->name); |
365 | } | 365 | } |
366 | 366 | ||
367 | static ssize_t serio_show_id_type(struct device *dev, char *buf) | 367 | static ssize_t serio_show_id_type(struct device *dev, struct device_attribute *attr, char *buf) |
368 | { | 368 | { |
369 | struct serio *serio = to_serio_port(dev); | 369 | struct serio *serio = to_serio_port(dev); |
370 | return sprintf(buf, "%02x\n", serio->id.type); | 370 | return sprintf(buf, "%02x\n", serio->id.type); |
371 | } | 371 | } |
372 | 372 | ||
373 | static ssize_t serio_show_id_proto(struct device *dev, char *buf) | 373 | static ssize_t serio_show_id_proto(struct device *dev, struct device_attribute *attr, char *buf) |
374 | { | 374 | { |
375 | struct serio *serio = to_serio_port(dev); | 375 | struct serio *serio = to_serio_port(dev); |
376 | return sprintf(buf, "%02x\n", serio->id.proto); | 376 | return sprintf(buf, "%02x\n", serio->id.proto); |
377 | } | 377 | } |
378 | 378 | ||
379 | static ssize_t serio_show_id_id(struct device *dev, char *buf) | 379 | static ssize_t serio_show_id_id(struct device *dev, struct device_attribute *attr, char *buf) |
380 | { | 380 | { |
381 | struct serio *serio = to_serio_port(dev); | 381 | struct serio *serio = to_serio_port(dev); |
382 | return sprintf(buf, "%02x\n", serio->id.id); | 382 | return sprintf(buf, "%02x\n", serio->id.id); |
383 | } | 383 | } |
384 | 384 | ||
385 | static ssize_t serio_show_id_extra(struct device *dev, char *buf) | 385 | static ssize_t serio_show_id_extra(struct device *dev, struct device_attribute *attr, char *buf) |
386 | { | 386 | { |
387 | struct serio *serio = to_serio_port(dev); | 387 | struct serio *serio = to_serio_port(dev); |
388 | return sprintf(buf, "%02x\n", serio->id.extra); | 388 | return sprintf(buf, "%02x\n", serio->id.extra); |
@@ -406,7 +406,7 @@ static struct attribute_group serio_id_attr_group = { | |||
406 | .attrs = serio_device_id_attrs, | 406 | .attrs = serio_device_id_attrs, |
407 | }; | 407 | }; |
408 | 408 | ||
409 | static ssize_t serio_rebind_driver(struct device *dev, const char *buf, size_t count) | 409 | static ssize_t serio_rebind_driver(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
410 | { | 410 | { |
411 | struct serio *serio = to_serio_port(dev); | 411 | struct serio *serio = to_serio_port(dev); |
412 | struct device_driver *drv; | 412 | struct device_driver *drv; |
@@ -437,13 +437,13 @@ static ssize_t serio_rebind_driver(struct device *dev, const char *buf, size_t c | |||
437 | return retval; | 437 | return retval; |
438 | } | 438 | } |
439 | 439 | ||
440 | static ssize_t serio_show_bind_mode(struct device *dev, char *buf) | 440 | static ssize_t serio_show_bind_mode(struct device *dev, struct device_attribute *attr, char *buf) |
441 | { | 441 | { |
442 | struct serio *serio = to_serio_port(dev); | 442 | struct serio *serio = to_serio_port(dev); |
443 | return sprintf(buf, "%s\n", serio->manual_bind ? "manual" : "auto"); | 443 | return sprintf(buf, "%s\n", serio->manual_bind ? "manual" : "auto"); |
444 | } | 444 | } |
445 | 445 | ||
446 | static ssize_t serio_set_bind_mode(struct device *dev, const char *buf, size_t count) | 446 | static ssize_t serio_set_bind_mode(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
447 | { | 447 | { |
448 | struct serio *serio = to_serio_port(dev); | 448 | struct serio *serio = to_serio_port(dev); |
449 | int retval; | 449 | int retval; |
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c index f6b85222ba3d..79ca38469159 100644 --- a/drivers/input/serio/serport.c +++ b/drivers/input/serio/serport.c | |||
@@ -257,7 +257,7 @@ static int __init serport_init(void) | |||
257 | 257 | ||
258 | static void __exit serport_exit(void) | 258 | static void __exit serport_exit(void) |
259 | { | 259 | { |
260 | tty_register_ldisc(N_MOUSE, NULL); | 260 | tty_unregister_ldisc(N_MOUSE); |
261 | } | 261 | } |
262 | 262 | ||
263 | module_init(serport_init); | 263 | module_init(serport_init); |
diff --git a/drivers/input/touchscreen/gunze.c b/drivers/input/touchscreen/gunze.c index c9d0a153671c..53a27e43dd23 100644 --- a/drivers/input/touchscreen/gunze.c +++ b/drivers/input/touchscreen/gunze.c | |||
@@ -68,8 +68,7 @@ static void gunze_process_packet(struct gunze* gunze, struct pt_regs *regs) | |||
68 | 68 | ||
69 | if (gunze->idx != GUNZE_MAX_LENGTH || gunze->data[5] != ',' || | 69 | if (gunze->idx != GUNZE_MAX_LENGTH || gunze->data[5] != ',' || |
70 | (gunze->data[0] != 'T' && gunze->data[0] != 'R')) { | 70 | (gunze->data[0] != 'T' && gunze->data[0] != 'R')) { |
71 | gunze->data[10] = 0; | 71 | printk(KERN_WARNING "gunze.c: bad packet: >%.*s<\n", GUNZE_MAX_LENGTH, gunze->data); |
72 | printk(KERN_WARNING "gunze.c: bad packet: >%s<\n", gunze->data); | ||
73 | return; | 72 | return; |
74 | } | 73 | } |
75 | 74 | ||
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c index d0afba85720b..50c63a155156 100644 --- a/drivers/input/tsdev.c +++ b/drivers/input/tsdev.c | |||
@@ -414,9 +414,9 @@ static struct input_handle *tsdev_connect(struct input_handler *handler, | |||
414 | S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor); | 414 | S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor); |
415 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2), | 415 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2), |
416 | S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); | 416 | S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); |
417 | class_simple_device_add(input_class, | 417 | class_device_create(input_class, |
418 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), | 418 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), |
419 | dev->dev, "ts%d", minor); | 419 | dev->dev, "ts%d", minor); |
420 | 420 | ||
421 | return &tsdev->handle; | 421 | return &tsdev->handle; |
422 | } | 422 | } |
@@ -426,7 +426,8 @@ static void tsdev_disconnect(struct input_handle *handle) | |||
426 | struct tsdev *tsdev = handle->private; | 426 | struct tsdev *tsdev = handle->private; |
427 | struct tsdev_list *list; | 427 | struct tsdev_list *list; |
428 | 428 | ||
429 | class_simple_device_remove(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); | 429 | class_device_destroy(input_class, |
430 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); | ||
430 | devfs_remove("input/ts%d", tsdev->minor); | 431 | devfs_remove("input/ts%d", tsdev->minor); |
431 | devfs_remove("input/tsraw%d", tsdev->minor); | 432 | devfs_remove("input/tsraw%d", tsdev->minor); |
432 | tsdev->exist = 0; | 433 | tsdev->exist = 0; |