diff options
Diffstat (limited to 'drivers/input')
29 files changed, 155 insertions, 51 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 76457d50bc34..7df5bfef2624 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -332,7 +332,7 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer, | |||
332 | struct evdev_client *client = file->private_data; | 332 | struct evdev_client *client = file->private_data; |
333 | struct evdev *evdev = client->evdev; | 333 | struct evdev *evdev = client->evdev; |
334 | struct input_event event; | 334 | struct input_event event; |
335 | int retval; | 335 | int retval = 0; |
336 | 336 | ||
337 | if (count < input_event_size()) | 337 | if (count < input_event_size()) |
338 | return -EINVAL; | 338 | return -EINVAL; |
@@ -386,7 +386,7 @@ static ssize_t evdev_read(struct file *file, char __user *buffer, | |||
386 | struct evdev_client *client = file->private_data; | 386 | struct evdev_client *client = file->private_data; |
387 | struct evdev *evdev = client->evdev; | 387 | struct evdev *evdev = client->evdev; |
388 | struct input_event event; | 388 | struct input_event event; |
389 | int retval; | 389 | int retval = 0; |
390 | 390 | ||
391 | if (count < input_event_size()) | 391 | if (count < input_event_size()) |
392 | return -EINVAL; | 392 | return -EINVAL; |
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index c351aa421f8f..da739d9d1905 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c | |||
@@ -449,7 +449,6 @@ static ssize_t gameport_rebind_driver(struct device *dev, struct device_attribut | |||
449 | } else if ((drv = driver_find(buf, &gameport_bus)) != NULL) { | 449 | } else if ((drv = driver_find(buf, &gameport_bus)) != NULL) { |
450 | gameport_disconnect_port(gameport); | 450 | gameport_disconnect_port(gameport); |
451 | error = gameport_bind_driver(gameport, to_gameport_driver(drv)); | 451 | error = gameport_bind_driver(gameport, to_gameport_driver(drv)); |
452 | put_driver(drv); | ||
453 | } else { | 452 | } else { |
454 | error = -EINVAL; | 453 | error = -EINVAL; |
455 | } | 454 | } |
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 32bbd4c77b7c..fd7a0d5bc94d 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -98,15 +98,15 @@ | |||
98 | #define XTYPE_XBOX360W 2 | 98 | #define XTYPE_XBOX360W 2 |
99 | #define XTYPE_UNKNOWN 3 | 99 | #define XTYPE_UNKNOWN 3 |
100 | 100 | ||
101 | static int dpad_to_buttons; | 101 | static bool dpad_to_buttons; |
102 | module_param(dpad_to_buttons, bool, S_IRUGO); | 102 | module_param(dpad_to_buttons, bool, S_IRUGO); |
103 | MODULE_PARM_DESC(dpad_to_buttons, "Map D-PAD to buttons rather than axes for unknown pads"); | 103 | MODULE_PARM_DESC(dpad_to_buttons, "Map D-PAD to buttons rather than axes for unknown pads"); |
104 | 104 | ||
105 | static int triggers_to_buttons; | 105 | static bool triggers_to_buttons; |
106 | module_param(triggers_to_buttons, bool, S_IRUGO); | 106 | module_param(triggers_to_buttons, bool, S_IRUGO); |
107 | MODULE_PARM_DESC(triggers_to_buttons, "Map triggers to buttons rather than axes for unknown pads"); | 107 | MODULE_PARM_DESC(triggers_to_buttons, "Map triggers to buttons rather than axes for unknown pads"); |
108 | 108 | ||
109 | static int sticks_to_null; | 109 | static bool sticks_to_null; |
110 | module_param(sticks_to_null, bool, S_IRUGO); | 110 | module_param(sticks_to_null, bool, S_IRUGO); |
111 | MODULE_PARM_DESC(sticks_to_null, "Do not map sticks at all for unknown pads"); | 111 | MODULE_PARM_DESC(sticks_to_null, "Do not map sticks at all for unknown pads"); |
112 | 112 | ||
diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c index 6df5f6aa7908..79172af164f2 100644 --- a/drivers/input/keyboard/amikbd.c +++ b/drivers/input/keyboard/amikbd.c | |||
@@ -259,6 +259,19 @@ static struct platform_driver amikbd_driver = { | |||
259 | .owner = THIS_MODULE, | 259 | .owner = THIS_MODULE, |
260 | }, | 260 | }, |
261 | }; | 261 | }; |
262 | module_platform_driver(amikbd_driver); | 262 | |
263 | static int __init amikbd_init(void) | ||
264 | { | ||
265 | return platform_driver_probe(&amikbd_driver, amikbd_probe); | ||
266 | } | ||
267 | |||
268 | module_init(amikbd_init); | ||
269 | |||
270 | static void __exit amikbd_exit(void) | ||
271 | { | ||
272 | platform_driver_unregister(&amikbd_driver); | ||
273 | } | ||
274 | |||
275 | module_exit(amikbd_exit); | ||
263 | 276 | ||
264 | MODULE_ALIAS("platform:amiga-keyboard"); | 277 | MODULE_ALIAS("platform:amiga-keyboard"); |
diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index 469825247552..9d82b3aeff5e 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c | |||
@@ -328,7 +328,18 @@ static struct platform_driver davinci_ks_driver = { | |||
328 | }, | 328 | }, |
329 | .remove = __devexit_p(davinci_ks_remove), | 329 | .remove = __devexit_p(davinci_ks_remove), |
330 | }; | 330 | }; |
331 | module_platform_driver(davinci_ks_driver); | 331 | |
332 | static int __init davinci_ks_init(void) | ||
333 | { | ||
334 | return platform_driver_probe(&davinci_ks_driver, davinci_ks_probe); | ||
335 | } | ||
336 | module_init(davinci_ks_init); | ||
337 | |||
338 | static void __exit davinci_ks_exit(void) | ||
339 | { | ||
340 | platform_driver_unregister(&davinci_ks_driver); | ||
341 | } | ||
342 | module_exit(davinci_ks_exit); | ||
332 | 343 | ||
333 | MODULE_AUTHOR("Miguel Aguilar"); | 344 | MODULE_AUTHOR("Miguel Aguilar"); |
334 | MODULE_DESCRIPTION("Texas Instruments DaVinci Key Scan Driver"); | 345 | MODULE_DESCRIPTION("Texas Instruments DaVinci Key Scan Driver"); |
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 5a71e55c9c54..e35566aa102f 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c | |||
@@ -390,7 +390,18 @@ static struct platform_driver ske_keypad_driver = { | |||
390 | .probe = ske_keypad_probe, | 390 | .probe = ske_keypad_probe, |
391 | .remove = __devexit_p(ske_keypad_remove), | 391 | .remove = __devexit_p(ske_keypad_remove), |
392 | }; | 392 | }; |
393 | module_platform_driver(ske_keypad_driver); | 393 | |
394 | static int __init ske_keypad_init(void) | ||
395 | { | ||
396 | return platform_driver_probe(&ske_keypad_driver, ske_keypad_probe); | ||
397 | } | ||
398 | module_init(ske_keypad_init); | ||
399 | |||
400 | static void __exit ske_keypad_exit(void) | ||
401 | { | ||
402 | platform_driver_unregister(&ske_keypad_driver); | ||
403 | } | ||
404 | module_exit(ske_keypad_exit); | ||
394 | 405 | ||
395 | MODULE_LICENSE("GPL v2"); | 406 | MODULE_LICENSE("GPL v2"); |
396 | MODULE_AUTHOR("Naveen Kumar <naveen.gaddipati@stericsson.com> / Sundar Iyer <sundar.iyer@stericsson.com>"); | 407 | MODULE_AUTHOR("Naveen Kumar <naveen.gaddipati@stericsson.com> / Sundar Iyer <sundar.iyer@stericsson.com>"); |
diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c index a588578037eb..67bec14e8b96 100644 --- a/drivers/input/keyboard/twl4030_keypad.c +++ b/drivers/input/keyboard/twl4030_keypad.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/i2c/twl.h> | 34 | #include <linux/i2c/twl.h> |
35 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
36 | 36 | ||
37 | |||
38 | /* | 37 | /* |
39 | * The TWL4030 family chips include a keypad controller that supports | 38 | * The TWL4030 family chips include a keypad controller that supports |
40 | * up to an 8x8 switch matrix. The controller can issue system wakeup | 39 | * up to an 8x8 switch matrix. The controller can issue system wakeup |
@@ -302,7 +301,7 @@ static int __devinit twl4030_kp_program(struct twl4030_keypad *kp) | |||
302 | if (twl4030_kpwrite_u8(kp, i, KEYP_DEB) < 0) | 301 | if (twl4030_kpwrite_u8(kp, i, KEYP_DEB) < 0) |
303 | return -EIO; | 302 | return -EIO; |
304 | 303 | ||
305 | /* Set timeout period to 100 ms */ | 304 | /* Set timeout period to 200 ms */ |
306 | i = KEYP_PERIOD_US(200000, PTV_PRESCALER); | 305 | i = KEYP_PERIOD_US(200000, PTV_PRESCALER); |
307 | if (twl4030_kpwrite_u8(kp, (i & 0xFF), KEYP_TIMEOUT_L) < 0) | 306 | if (twl4030_kpwrite_u8(kp, (i & 0xFF), KEYP_TIMEOUT_L) < 0) |
308 | return -EIO; | 307 | return -EIO; |
@@ -466,4 +465,3 @@ MODULE_AUTHOR("Texas Instruments"); | |||
466 | MODULE_DESCRIPTION("TWL4030 Keypad Driver"); | 465 | MODULE_DESCRIPTION("TWL4030 Keypad Driver"); |
467 | MODULE_LICENSE("GPL"); | 466 | MODULE_LICENSE("GPL"); |
468 | MODULE_ALIAS("platform:twl4030_keypad"); | 467 | MODULE_ALIAS("platform:twl4030_keypad"); |
469 | |||
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c index 79d901633635..350fd0c385d2 100644 --- a/drivers/input/misc/ab8500-ponkey.c +++ b/drivers/input/misc/ab8500-ponkey.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/input.h> | 13 | #include <linux/input.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/mfd/ab8500.h> | 15 | #include <linux/mfd/abx500/ab8500.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | 17 | ||
18 | /** | 18 | /** |
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index 19a68828cd86..38e4b507b94c 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c | |||
@@ -107,14 +107,25 @@ static int __exit twl4030_pwrbutton_remove(struct platform_device *pdev) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | static struct platform_driver twl4030_pwrbutton_driver = { | 109 | static struct platform_driver twl4030_pwrbutton_driver = { |
110 | .probe = twl4030_pwrbutton_probe, | ||
111 | .remove = __exit_p(twl4030_pwrbutton_remove), | 110 | .remove = __exit_p(twl4030_pwrbutton_remove), |
112 | .driver = { | 111 | .driver = { |
113 | .name = "twl4030_pwrbutton", | 112 | .name = "twl4030_pwrbutton", |
114 | .owner = THIS_MODULE, | 113 | .owner = THIS_MODULE, |
115 | }, | 114 | }, |
116 | }; | 115 | }; |
117 | module_platform_driver(twl4030_pwrbutton_driver); | 116 | |
117 | static int __init twl4030_pwrbutton_init(void) | ||
118 | { | ||
119 | return platform_driver_probe(&twl4030_pwrbutton_driver, | ||
120 | twl4030_pwrbutton_probe); | ||
121 | } | ||
122 | module_init(twl4030_pwrbutton_init); | ||
123 | |||
124 | static void __exit twl4030_pwrbutton_exit(void) | ||
125 | { | ||
126 | platform_driver_unregister(&twl4030_pwrbutton_driver); | ||
127 | } | ||
128 | module_exit(twl4030_pwrbutton_exit); | ||
118 | 129 | ||
119 | MODULE_ALIAS("platform:twl4030_pwrbutton"); | 130 | MODULE_ALIAS("platform:twl4030_pwrbutton"); |
120 | MODULE_DESCRIPTION("Triton2 Power Button"); | 131 | MODULE_DESCRIPTION("Triton2 Power Button"); |
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c index 37651373a95b..f3bc4189a7ba 100644 --- a/drivers/input/misc/twl4030-vibra.c +++ b/drivers/input/misc/twl4030-vibra.c | |||
@@ -172,7 +172,7 @@ static void twl4030_vibra_close(struct input_dev *input) | |||
172 | } | 172 | } |
173 | 173 | ||
174 | /*** Module ***/ | 174 | /*** Module ***/ |
175 | #if CONFIG_PM | 175 | #if CONFIG_PM_SLEEP |
176 | static int twl4030_vibra_suspend(struct device *dev) | 176 | static int twl4030_vibra_suspend(struct device *dev) |
177 | { | 177 | { |
178 | struct platform_device *pdev = to_platform_device(dev); | 178 | struct platform_device *pdev = to_platform_device(dev); |
@@ -189,10 +189,10 @@ static int twl4030_vibra_resume(struct device *dev) | |||
189 | vibra_disable_leds(); | 189 | vibra_disable_leds(); |
190 | return 0; | 190 | return 0; |
191 | } | 191 | } |
192 | #endif | ||
192 | 193 | ||
193 | static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, | 194 | static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, |
194 | twl4030_vibra_suspend, twl4030_vibra_resume); | 195 | twl4030_vibra_suspend, twl4030_vibra_resume); |
195 | #endif | ||
196 | 196 | ||
197 | static int __devinit twl4030_vibra_probe(struct platform_device *pdev) | 197 | static int __devinit twl4030_vibra_probe(struct platform_device *pdev) |
198 | { | 198 | { |
@@ -273,9 +273,7 @@ static struct platform_driver twl4030_vibra_driver = { | |||
273 | .driver = { | 273 | .driver = { |
274 | .name = "twl4030-vibra", | 274 | .name = "twl4030-vibra", |
275 | .owner = THIS_MODULE, | 275 | .owner = THIS_MODULE, |
276 | #ifdef CONFIG_PM | ||
277 | .pm = &twl4030_vibra_pm_ops, | 276 | .pm = &twl4030_vibra_pm_ops, |
278 | #endif | ||
279 | }, | 277 | }, |
280 | }; | 278 | }; |
281 | module_platform_driver(twl4030_vibra_driver); | 279 | module_platform_driver(twl4030_vibra_driver); |
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 52b419348983..e2bdfd4bea70 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
@@ -48,7 +48,7 @@ MODULE_DESCRIPTION("Wistron laptop button driver"); | |||
48 | MODULE_LICENSE("GPL v2"); | 48 | MODULE_LICENSE("GPL v2"); |
49 | MODULE_VERSION("0.3"); | 49 | MODULE_VERSION("0.3"); |
50 | 50 | ||
51 | static int force; /* = 0; */ | 51 | static bool force; /* = 0; */ |
52 | module_param(force, bool, 0); | 52 | module_param(force, bool, 0); |
53 | MODULE_PARM_DESC(force, "Load even if computer is not in database"); | 53 | MODULE_PARM_DESC(force, "Load even if computer is not in database"); |
54 | 54 | ||
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index bd87380bd879..4c6a72d3d48c 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -952,7 +952,9 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int | |||
952 | 952 | ||
953 | /* | 953 | /* |
954 | * First try "E6 report". | 954 | * First try "E6 report". |
955 | * ALPS should return 0,0,10 or 0,0,100 | 955 | * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed. |
956 | * The bits 0-2 of the first byte will be 1s if some buttons are | ||
957 | * pressed. | ||
956 | */ | 958 | */ |
957 | param[0] = 0; | 959 | param[0] = 0; |
958 | if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) || | 960 | if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) || |
@@ -968,7 +970,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int | |||
968 | psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x", | 970 | psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x", |
969 | param[0], param[1], param[2]); | 971 | param[0], param[1], param[2]); |
970 | 972 | ||
971 | if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100)) | 973 | if ((param[0] & 0xf8) != 0 || param[1] != 0 || |
974 | (param[2] != 10 && param[2] != 100)) | ||
972 | return NULL; | 975 | return NULL; |
973 | 976 | ||
974 | /* | 977 | /* |
diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c index 39be7b82c046..ff5f61a0fd3a 100644 --- a/drivers/input/mouse/amimouse.c +++ b/drivers/input/mouse/amimouse.c | |||
@@ -140,13 +140,25 @@ static int __exit amimouse_remove(struct platform_device *pdev) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | static struct platform_driver amimouse_driver = { | 142 | static struct platform_driver amimouse_driver = { |
143 | .probe = amimouse_probe, | ||
144 | .remove = __exit_p(amimouse_remove), | 143 | .remove = __exit_p(amimouse_remove), |
145 | .driver = { | 144 | .driver = { |
146 | .name = "amiga-mouse", | 145 | .name = "amiga-mouse", |
147 | .owner = THIS_MODULE, | 146 | .owner = THIS_MODULE, |
148 | }, | 147 | }, |
149 | }; | 148 | }; |
150 | module_platform_driver(amimouse_driver); | 149 | |
150 | static int __init amimouse_init(void) | ||
151 | { | ||
152 | return platform_driver_probe(&amimouse_driver, amimouse_probe); | ||
153 | } | ||
154 | |||
155 | module_init(amimouse_init); | ||
156 | |||
157 | static void __exit amimouse_exit(void) | ||
158 | { | ||
159 | platform_driver_unregister(&amimouse_driver); | ||
160 | } | ||
161 | |||
162 | module_exit(amimouse_exit); | ||
151 | 163 | ||
152 | MODULE_ALIAS("platform:amiga-mouse"); | 164 | MODULE_ALIAS("platform:amiga-mouse"); |
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index cf87f8b18e34..927e479c2649 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
@@ -433,6 +433,9 @@ static void setup_events_to_report(struct input_dev *input_dev, | |||
433 | __set_bit(BTN_TOOL_QUADTAP, input_dev->keybit); | 433 | __set_bit(BTN_TOOL_QUADTAP, input_dev->keybit); |
434 | __set_bit(BTN_LEFT, input_dev->keybit); | 434 | __set_bit(BTN_LEFT, input_dev->keybit); |
435 | 435 | ||
436 | if (cfg->caps & HAS_INTEGRATED_BUTTON) | ||
437 | __set_bit(INPUT_PROP_BUTTONPAD, input_dev->propbit); | ||
438 | |||
436 | input_set_events_per_packet(input_dev, 60); | 439 | input_set_events_per_packet(input_dev, 60); |
437 | } | 440 | } |
438 | 441 | ||
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index de7e8bc17b1f..e6c9931f02c7 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -60,7 +60,7 @@ static unsigned int psmouse_rate = 100; | |||
60 | module_param_named(rate, psmouse_rate, uint, 0644); | 60 | module_param_named(rate, psmouse_rate, uint, 0644); |
61 | MODULE_PARM_DESC(rate, "Report rate, in reports per second."); | 61 | MODULE_PARM_DESC(rate, "Report rate, in reports per second."); |
62 | 62 | ||
63 | static unsigned int psmouse_smartscroll = 1; | 63 | static bool psmouse_smartscroll = 1; |
64 | module_param_named(smartscroll, psmouse_smartscroll, bool, 0644); | 64 | module_param_named(smartscroll, psmouse_smartscroll, bool, 0644); |
65 | MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled."); | 65 | MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled."); |
66 | 66 | ||
diff --git a/drivers/input/mouse/synaptics_i2c.c b/drivers/input/mouse/synaptics_i2c.c index 4b755cb5b38c..1c58aafa523f 100644 --- a/drivers/input/mouse/synaptics_i2c.c +++ b/drivers/input/mouse/synaptics_i2c.c | |||
@@ -185,17 +185,17 @@ | |||
185 | #define NO_DATA_SLEEP_MSECS (MSEC_PER_SEC / 4) | 185 | #define NO_DATA_SLEEP_MSECS (MSEC_PER_SEC / 4) |
186 | 186 | ||
187 | /* Control touchpad's No Deceleration option */ | 187 | /* Control touchpad's No Deceleration option */ |
188 | static int no_decel = 1; | 188 | static bool no_decel = 1; |
189 | module_param(no_decel, bool, 0644); | 189 | module_param(no_decel, bool, 0644); |
190 | MODULE_PARM_DESC(no_decel, "No Deceleration. Default = 1 (on)"); | 190 | MODULE_PARM_DESC(no_decel, "No Deceleration. Default = 1 (on)"); |
191 | 191 | ||
192 | /* Control touchpad's Reduced Reporting option */ | 192 | /* Control touchpad's Reduced Reporting option */ |
193 | static int reduce_report; | 193 | static bool reduce_report; |
194 | module_param(reduce_report, bool, 0644); | 194 | module_param(reduce_report, bool, 0644); |
195 | MODULE_PARM_DESC(reduce_report, "Reduced Reporting. Default = 0 (off)"); | 195 | MODULE_PARM_DESC(reduce_report, "Reduced Reporting. Default = 0 (off)"); |
196 | 196 | ||
197 | /* Control touchpad's No Filter option */ | 197 | /* Control touchpad's No Filter option */ |
198 | static int no_filter; | 198 | static bool no_filter; |
199 | module_param(no_filter, bool, 0644); | 199 | module_param(no_filter, bool, 0644); |
200 | MODULE_PARM_DESC(no_filter, "No Filter. Default = 0 (off)"); | 200 | MODULE_PARM_DESC(no_filter, "No Filter. Default = 0 (off)"); |
201 | 201 | ||
diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c index 421a7442e464..95280f9207e1 100644 --- a/drivers/input/serio/at32psif.c +++ b/drivers/input/serio/at32psif.c | |||
@@ -358,7 +358,19 @@ static struct platform_driver psif_driver = { | |||
358 | .suspend = psif_suspend, | 358 | .suspend = psif_suspend, |
359 | .resume = psif_resume, | 359 | .resume = psif_resume, |
360 | }; | 360 | }; |
361 | module_platform_driver(psif_driver); | 361 | |
362 | static int __init psif_init(void) | ||
363 | { | ||
364 | return platform_driver_probe(&psif_driver, psif_probe); | ||
365 | } | ||
366 | |||
367 | static void __exit psif_exit(void) | ||
368 | { | ||
369 | platform_driver_unregister(&psif_driver); | ||
370 | } | ||
371 | |||
372 | module_init(psif_init); | ||
373 | module_exit(psif_exit); | ||
362 | 374 | ||
363 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); | 375 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); |
364 | MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver"); | 376 | MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver"); |
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c index 979c443bf1ef..be3316073ae7 100644 --- a/drivers/input/serio/hp_sdc.c +++ b/drivers/input/serio/hp_sdc.c | |||
@@ -105,7 +105,7 @@ EXPORT_SYMBOL(__hp_sdc_enqueue_transaction); | |||
105 | EXPORT_SYMBOL(hp_sdc_enqueue_transaction); | 105 | EXPORT_SYMBOL(hp_sdc_enqueue_transaction); |
106 | EXPORT_SYMBOL(hp_sdc_dequeue_transaction); | 106 | EXPORT_SYMBOL(hp_sdc_dequeue_transaction); |
107 | 107 | ||
108 | static unsigned int hp_sdc_disabled; | 108 | static bool hp_sdc_disabled; |
109 | module_param_named(no_hpsdc, hp_sdc_disabled, bool, 0); | 109 | module_param_named(no_hpsdc, hp_sdc_disabled, bool, 0); |
110 | MODULE_PARM_DESC(no_hpsdc, "Do not enable HP SDC driver."); | 110 | MODULE_PARM_DESC(no_hpsdc, "Do not enable HP SDC driver."); |
111 | 111 | ||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index b4cfc6c8be89..5ec774d6c82b 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -512,6 +512,13 @@ static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = { | |||
512 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"), | 512 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"), |
513 | }, | 513 | }, |
514 | }, | 514 | }, |
515 | { | ||
516 | /* Lenovo Ideapad U455 */ | ||
517 | .matches = { | ||
518 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
519 | DMI_MATCH(DMI_PRODUCT_NAME, "20046"), | ||
520 | }, | ||
521 | }, | ||
515 | { } | 522 | { } |
516 | }; | 523 | }; |
517 | 524 | ||
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index ba70058e2be3..d0f7533dbf88 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c | |||
@@ -441,7 +441,6 @@ static ssize_t serio_rebind_driver(struct device *dev, struct device_attribute * | |||
441 | } else if ((drv = driver_find(buf, &serio_bus)) != NULL) { | 441 | } else if ((drv = driver_find(buf, &serio_bus)) != NULL) { |
442 | serio_disconnect_port(serio); | 442 | serio_disconnect_port(serio); |
443 | error = serio_bind_driver(serio, to_serio_driver(drv)); | 443 | error = serio_bind_driver(serio, to_serio_driver(drv)); |
444 | put_driver(drv); | ||
445 | serio_remove_duplicate_events(serio, SERIO_RESCAN_PORT); | 444 | serio_remove_duplicate_events(serio, SERIO_RESCAN_PORT); |
446 | } else { | 445 | } else { |
447 | error = -EINVAL; | 446 | error = -EINVAL; |
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 4d4cd142bbbb..4494233d331a 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c | |||
@@ -164,7 +164,8 @@ static ssize_t serio_raw_read(struct file *file, char __user *buffer, | |||
164 | struct serio_raw_client *client = file->private_data; | 164 | struct serio_raw_client *client = file->private_data; |
165 | struct serio_raw *serio_raw = client->serio_raw; | 165 | struct serio_raw *serio_raw = client->serio_raw; |
166 | char uninitialized_var(c); | 166 | char uninitialized_var(c); |
167 | ssize_t retval = 0; | 167 | ssize_t read = 0; |
168 | int retval; | ||
168 | 169 | ||
169 | if (serio_raw->dead) | 170 | if (serio_raw->dead) |
170 | return -ENODEV; | 171 | return -ENODEV; |
@@ -180,13 +181,15 @@ static ssize_t serio_raw_read(struct file *file, char __user *buffer, | |||
180 | if (serio_raw->dead) | 181 | if (serio_raw->dead) |
181 | return -ENODEV; | 182 | return -ENODEV; |
182 | 183 | ||
183 | while (retval < count && serio_raw_fetch_byte(serio_raw, &c)) { | 184 | while (read < count && serio_raw_fetch_byte(serio_raw, &c)) { |
184 | if (put_user(c, buffer++)) | 185 | if (put_user(c, buffer++)) { |
185 | return -EFAULT; | 186 | retval = -EFAULT; |
186 | retval++; | 187 | break; |
188 | } | ||
189 | read++; | ||
187 | } | 190 | } |
188 | 191 | ||
189 | return retval; | 192 | return read ?: retval; |
190 | } | 193 | } |
191 | 194 | ||
192 | static ssize_t serio_raw_write(struct file *file, const char __user *buffer, | 195 | static ssize_t serio_raw_write(struct file *file, const char __user *buffer, |
@@ -220,11 +223,11 @@ static ssize_t serio_raw_write(struct file *file, const char __user *buffer, | |||
220 | goto out; | 223 | goto out; |
221 | } | 224 | } |
222 | written++; | 225 | written++; |
223 | }; | 226 | } |
224 | 227 | ||
225 | out: | 228 | out: |
226 | mutex_unlock(&serio_raw_mutex); | 229 | mutex_unlock(&serio_raw_mutex); |
227 | return written; | 230 | return written ?: retval; |
228 | } | 231 | } |
229 | 232 | ||
230 | static unsigned int serio_raw_poll(struct file *file, poll_table *wait) | 233 | static unsigned int serio_raw_poll(struct file *file, poll_table *wait) |
@@ -237,9 +240,9 @@ static unsigned int serio_raw_poll(struct file *file, poll_table *wait) | |||
237 | 240 | ||
238 | mask = serio_raw->dead ? POLLHUP | POLLERR : POLLOUT | POLLWRNORM; | 241 | mask = serio_raw->dead ? POLLHUP | POLLERR : POLLOUT | POLLWRNORM; |
239 | if (serio_raw->head != serio_raw->tail) | 242 | if (serio_raw->head != serio_raw->tail) |
240 | return POLLIN | POLLRDNORM; | 243 | mask |= POLLIN | POLLRDNORM; |
241 | 244 | ||
242 | return 0; | 245 | return mask; |
243 | } | 246 | } |
244 | 247 | ||
245 | static const struct file_operations serio_raw_fops = { | 248 | static const struct file_operations serio_raw_fops = { |
diff --git a/drivers/input/tablet/Kconfig b/drivers/input/tablet/Kconfig index 58a87755b936..e53f4081a586 100644 --- a/drivers/input/tablet/Kconfig +++ b/drivers/input/tablet/Kconfig | |||
@@ -77,6 +77,8 @@ config TABLET_USB_WACOM | |||
77 | tristate "Wacom Intuos/Graphire tablet support (USB)" | 77 | tristate "Wacom Intuos/Graphire tablet support (USB)" |
78 | depends on USB_ARCH_HAS_HCD | 78 | depends on USB_ARCH_HAS_HCD |
79 | select USB | 79 | select USB |
80 | select NEW_LEDS | ||
81 | select LEDS_CLASS | ||
80 | help | 82 | help |
81 | Say Y here if you want to use the USB version of the Wacom Intuos | 83 | Say Y here if you want to use the USB version of the Wacom Intuos |
82 | or Graphire tablet. Make sure to say Y to "Mouse support" | 84 | or Graphire tablet. Make sure to say Y to "Mouse support" |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 88672ec296c1..cd3ed29e0801 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -926,7 +926,7 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom) | |||
926 | { | 926 | { |
927 | struct input_dev *input = wacom->input; | 927 | struct input_dev *input = wacom->input; |
928 | unsigned char *data = wacom->data; | 928 | unsigned char *data = wacom->data; |
929 | int count = data[1] & 0x03; | 929 | int count = data[1] & 0x07; |
930 | int i; | 930 | int i; |
931 | 931 | ||
932 | if (data[0] != 0x02) | 932 | if (data[0] != 0x02) |
diff --git a/drivers/input/touchscreen/atmel-wm97xx.c b/drivers/input/touchscreen/atmel-wm97xx.c index d016cb26d125..8034cbb20f74 100644 --- a/drivers/input/touchscreen/atmel-wm97xx.c +++ b/drivers/input/touchscreen/atmel-wm97xx.c | |||
@@ -429,7 +429,18 @@ static struct platform_driver atmel_wm97xx_driver = { | |||
429 | .suspend = atmel_wm97xx_suspend, | 429 | .suspend = atmel_wm97xx_suspend, |
430 | .resume = atmel_wm97xx_resume, | 430 | .resume = atmel_wm97xx_resume, |
431 | }; | 431 | }; |
432 | module_platform_driver(atmel_wm97xx_driver); | 432 | |
433 | static int __init atmel_wm97xx_init(void) | ||
434 | { | ||
435 | return platform_driver_probe(&atmel_wm97xx_driver, atmel_wm97xx_probe); | ||
436 | } | ||
437 | module_init(atmel_wm97xx_init); | ||
438 | |||
439 | static void __exit atmel_wm97xx_exit(void) | ||
440 | { | ||
441 | platform_driver_unregister(&atmel_wm97xx_driver); | ||
442 | } | ||
443 | module_exit(atmel_wm97xx_exit); | ||
433 | 444 | ||
434 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); | 445 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); |
435 | MODULE_DESCRIPTION("wm97xx continuous touch driver for Atmel AT91 and AVR32"); | 446 | MODULE_DESCRIPTION("wm97xx continuous touch driver for Atmel AT91 and AVR32"); |
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index 7f8f538a9806..1df19bb8534a 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c | |||
@@ -35,11 +35,11 @@ | |||
35 | #include <linux/input/eeti_ts.h> | 35 | #include <linux/input/eeti_ts.h> |
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | 37 | ||
38 | static int flip_x; | 38 | static bool flip_x; |
39 | module_param(flip_x, bool, 0644); | 39 | module_param(flip_x, bool, 0644); |
40 | MODULE_PARM_DESC(flip_x, "flip x coordinate"); | 40 | MODULE_PARM_DESC(flip_x, "flip x coordinate"); |
41 | 41 | ||
42 | static int flip_y; | 42 | static bool flip_y; |
43 | module_param(flip_y, bool, 0644); | 43 | module_param(flip_y, bool, 0644); |
44 | MODULE_PARM_DESC(flip_y, "flip y coordinate"); | 44 | MODULE_PARM_DESC(flip_y, "flip y coordinate"); |
45 | 45 | ||
diff --git a/drivers/input/touchscreen/htcpen.c b/drivers/input/touchscreen/htcpen.c index 81e338623944..d13143b68b3e 100644 --- a/drivers/input/touchscreen/htcpen.c +++ b/drivers/input/touchscreen/htcpen.c | |||
@@ -40,10 +40,10 @@ MODULE_LICENSE("GPL"); | |||
40 | #define X_AXIS_MAX 2040 | 40 | #define X_AXIS_MAX 2040 |
41 | #define Y_AXIS_MAX 2040 | 41 | #define Y_AXIS_MAX 2040 |
42 | 42 | ||
43 | static int invert_x; | 43 | static bool invert_x; |
44 | module_param(invert_x, bool, 0644); | 44 | module_param(invert_x, bool, 0644); |
45 | MODULE_PARM_DESC(invert_x, "If set, X axis is inverted"); | 45 | MODULE_PARM_DESC(invert_x, "If set, X axis is inverted"); |
46 | static int invert_y; | 46 | static bool invert_y; |
47 | module_param(invert_y, bool, 0644); | 47 | module_param(invert_y, bool, 0644); |
48 | MODULE_PARM_DESC(invert_y, "If set, Y axis is inverted"); | 48 | MODULE_PARM_DESC(invert_y, "If set, Y axis is inverted"); |
49 | 49 | ||
diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c index 68f86f7dabbc..ede02743eac1 100644 --- a/drivers/input/touchscreen/mc13783_ts.c +++ b/drivers/input/touchscreen/mc13783_ts.c | |||
@@ -240,7 +240,18 @@ static struct platform_driver mc13783_ts_driver = { | |||
240 | .name = MC13783_TS_NAME, | 240 | .name = MC13783_TS_NAME, |
241 | }, | 241 | }, |
242 | }; | 242 | }; |
243 | module_platform_driver(mc13783_ts_driver); | 243 | |
244 | static int __init mc13783_ts_init(void) | ||
245 | { | ||
246 | return platform_driver_probe(&mc13783_ts_driver, &mc13783_ts_probe); | ||
247 | } | ||
248 | module_init(mc13783_ts_init); | ||
249 | |||
250 | static void __exit mc13783_ts_exit(void) | ||
251 | { | ||
252 | platform_driver_unregister(&mc13783_ts_driver); | ||
253 | } | ||
254 | module_exit(mc13783_ts_exit); | ||
244 | 255 | ||
245 | MODULE_DESCRIPTION("MC13783 input touchscreen driver"); | 256 | MODULE_DESCRIPTION("MC13783 input touchscreen driver"); |
246 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); | 257 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); |
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index d2b57536feea..46e83ad53f43 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #define UCB1400_TS_POLL_PERIOD 10 /* ms */ | 31 | #define UCB1400_TS_POLL_PERIOD 10 /* ms */ |
32 | 32 | ||
33 | static int adcsync; | 33 | static bool adcsync; |
34 | static int ts_delay = 55; /* us */ | 34 | static int ts_delay = 55; /* us */ |
35 | static int ts_delay_pressure; /* us */ | 35 | static int ts_delay_pressure; /* us */ |
36 | 36 | ||
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 06cef3ccc63a..3a5ebf452e81 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c | |||
@@ -60,11 +60,11 @@ | |||
60 | #define DRIVER_AUTHOR "Daniel Ritz <daniel.ritz@gmx.ch>" | 60 | #define DRIVER_AUTHOR "Daniel Ritz <daniel.ritz@gmx.ch>" |
61 | #define DRIVER_DESC "USB Touchscreen Driver" | 61 | #define DRIVER_DESC "USB Touchscreen Driver" |
62 | 62 | ||
63 | static int swap_xy; | 63 | static bool swap_xy; |
64 | module_param(swap_xy, bool, 0644); | 64 | module_param(swap_xy, bool, 0644); |
65 | MODULE_PARM_DESC(swap_xy, "If set X and Y axes are swapped."); | 65 | MODULE_PARM_DESC(swap_xy, "If set X and Y axes are swapped."); |
66 | 66 | ||
67 | static int hwcalib_xy; | 67 | static bool hwcalib_xy; |
68 | module_param(hwcalib_xy, bool, 0644); | 68 | module_param(hwcalib_xy, bool, 0644); |
69 | MODULE_PARM_DESC(hwcalib_xy, "If set hw-calibrated X/Y are used if available"); | 69 | MODULE_PARM_DESC(hwcalib_xy, "If set hw-calibrated X/Y are used if available"); |
70 | 70 | ||