diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-07-21 00:55:14 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-07-21 00:55:14 -0400 |
commit | 908cf4b925e419bc74f3297b2f0e51d6f8a81da2 (patch) | |
tree | 6c2da79366d4695a9c2560ab18259eca8a2a25b4 /drivers/input | |
parent | 92c49890922d54cba4b1eadeb0b185773c2c9570 (diff) | |
parent | 14b395e35d1afdd8019d11b92e28041fad591b71 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/ff-core.c | 18 | ||||
-rw-r--r-- | drivers/input/input.c | 16 | ||||
-rw-r--r-- | drivers/input/keyboard/aaed2000_kbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/atakbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/corgikbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/hilkbd.c | 4 | ||||
-rw-r--r-- | drivers/input/keyboard/jornada680_kbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/jornada720_kbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/spitzkbd.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/hp_sdc_rtc.c | 7 | ||||
-rw-r--r-- | drivers/input/misc/uinput.c | 3 | ||||
-rw-r--r-- | drivers/input/mousedev.c | 12 | ||||
-rw-r--r-- | drivers/input/serio/hp_sdc_mlc.c | 5 | ||||
-rw-r--r-- | drivers/input/serio/q40kbd.c | 2 | ||||
-rw-r--r-- | drivers/input/serio/serio_raw.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/serport.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/jornada720_ts.c | 2 | ||||
-rw-r--r-- | drivers/input/xen-kbdfront.c | 20 |
18 files changed, 86 insertions, 23 deletions
diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c index eebc72465fc9..72c63e5dd630 100644 --- a/drivers/input/ff-core.c +++ b/drivers/input/ff-core.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | #include <linux/sched.h> | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * Check that the effect_id is a valid effect and whether the user | 34 | * Check that the effect_id is a valid effect and whether the user |
@@ -166,8 +167,10 @@ int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, | |||
166 | if (ret) | 167 | if (ret) |
167 | goto out; | 168 | goto out; |
168 | 169 | ||
170 | spin_lock_irq(&dev->event_lock); | ||
169 | ff->effects[id] = *effect; | 171 | ff->effects[id] = *effect; |
170 | ff->effect_owners[id] = file; | 172 | ff->effect_owners[id] = file; |
173 | spin_unlock_irq(&dev->event_lock); | ||
171 | 174 | ||
172 | out: | 175 | out: |
173 | mutex_unlock(&ff->mutex); | 176 | mutex_unlock(&ff->mutex); |
@@ -189,16 +192,22 @@ static int erase_effect(struct input_dev *dev, int effect_id, | |||
189 | if (error) | 192 | if (error) |
190 | return error; | 193 | return error; |
191 | 194 | ||
195 | spin_lock_irq(&dev->event_lock); | ||
192 | ff->playback(dev, effect_id, 0); | 196 | ff->playback(dev, effect_id, 0); |
197 | ff->effect_owners[effect_id] = NULL; | ||
198 | spin_unlock_irq(&dev->event_lock); | ||
193 | 199 | ||
194 | if (ff->erase) { | 200 | if (ff->erase) { |
195 | error = ff->erase(dev, effect_id); | 201 | error = ff->erase(dev, effect_id); |
196 | if (error) | 202 | if (error) { |
203 | spin_lock_irq(&dev->event_lock); | ||
204 | ff->effect_owners[effect_id] = file; | ||
205 | spin_unlock_irq(&dev->event_lock); | ||
206 | |||
197 | return error; | 207 | return error; |
208 | } | ||
198 | } | 209 | } |
199 | 210 | ||
200 | ff->effect_owners[effect_id] = NULL; | ||
201 | |||
202 | return 0; | 211 | return 0; |
203 | } | 212 | } |
204 | 213 | ||
@@ -263,8 +272,6 @@ int input_ff_event(struct input_dev *dev, unsigned int type, | |||
263 | if (type != EV_FF) | 272 | if (type != EV_FF) |
264 | return 0; | 273 | return 0; |
265 | 274 | ||
266 | mutex_lock(&ff->mutex); | ||
267 | |||
268 | switch (code) { | 275 | switch (code) { |
269 | case FF_GAIN: | 276 | case FF_GAIN: |
270 | if (!test_bit(FF_GAIN, dev->ffbit) || value > 0xffff) | 277 | if (!test_bit(FF_GAIN, dev->ffbit) || value > 0xffff) |
@@ -286,7 +293,6 @@ int input_ff_event(struct input_dev *dev, unsigned int type, | |||
286 | break; | 293 | break; |
287 | } | 294 | } |
288 | 295 | ||
289 | mutex_unlock(&ff->mutex); | ||
290 | return 0; | 296 | return 0; |
291 | } | 297 | } |
292 | EXPORT_SYMBOL_GPL(input_ff_event); | 298 | EXPORT_SYMBOL_GPL(input_ff_event); |
diff --git a/drivers/input/input.c b/drivers/input/input.c index cae48117e86b..c13ced3e0d3d 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/rcupdate.h> | 23 | #include <linux/rcupdate.h> |
24 | #include <linux/smp_lock.h> | ||
24 | 25 | ||
25 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>"); | 26 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>"); |
26 | MODULE_DESCRIPTION("Input core"); | 27 | MODULE_DESCRIPTION("Input core"); |
@@ -1588,13 +1589,17 @@ EXPORT_SYMBOL(input_unregister_handle); | |||
1588 | 1589 | ||
1589 | static int input_open_file(struct inode *inode, struct file *file) | 1590 | static int input_open_file(struct inode *inode, struct file *file) |
1590 | { | 1591 | { |
1591 | struct input_handler *handler = input_table[iminor(inode) >> 5]; | 1592 | struct input_handler *handler; |
1592 | const struct file_operations *old_fops, *new_fops = NULL; | 1593 | const struct file_operations *old_fops, *new_fops = NULL; |
1593 | int err; | 1594 | int err; |
1594 | 1595 | ||
1596 | lock_kernel(); | ||
1595 | /* No load-on-demand here? */ | 1597 | /* No load-on-demand here? */ |
1596 | if (!handler || !(new_fops = fops_get(handler->fops))) | 1598 | handler = input_table[iminor(inode) >> 5]; |
1597 | return -ENODEV; | 1599 | if (!handler || !(new_fops = fops_get(handler->fops))) { |
1600 | err = -ENODEV; | ||
1601 | goto out; | ||
1602 | } | ||
1598 | 1603 | ||
1599 | /* | 1604 | /* |
1600 | * That's _really_ odd. Usually NULL ->open means "nothing special", | 1605 | * That's _really_ odd. Usually NULL ->open means "nothing special", |
@@ -1602,7 +1607,8 @@ static int input_open_file(struct inode *inode, struct file *file) | |||
1602 | */ | 1607 | */ |
1603 | if (!new_fops->open) { | 1608 | if (!new_fops->open) { |
1604 | fops_put(new_fops); | 1609 | fops_put(new_fops); |
1605 | return -ENODEV; | 1610 | err = -ENODEV; |
1611 | goto out; | ||
1606 | } | 1612 | } |
1607 | old_fops = file->f_op; | 1613 | old_fops = file->f_op; |
1608 | file->f_op = new_fops; | 1614 | file->f_op = new_fops; |
@@ -1614,6 +1620,8 @@ static int input_open_file(struct inode *inode, struct file *file) | |||
1614 | file->f_op = fops_get(old_fops); | 1620 | file->f_op = fops_get(old_fops); |
1615 | } | 1621 | } |
1616 | fops_put(old_fops); | 1622 | fops_put(old_fops); |
1623 | out: | ||
1624 | unlock_kernel(); | ||
1617 | return err; | 1625 | return err; |
1618 | } | 1626 | } |
1619 | 1627 | ||
diff --git a/drivers/input/keyboard/aaed2000_kbd.c b/drivers/input/keyboard/aaed2000_kbd.c index a293e8b3f508..8a77bfcd05bc 100644 --- a/drivers/input/keyboard/aaed2000_kbd.c +++ b/drivers/input/keyboard/aaed2000_kbd.c | |||
@@ -183,4 +183,4 @@ module_exit(aaedkbd_exit); | |||
183 | 183 | ||
184 | MODULE_AUTHOR("Nicolas Bellido Y Ortega"); | 184 | MODULE_AUTHOR("Nicolas Bellido Y Ortega"); |
185 | MODULE_DESCRIPTION("AAED-2000 Keyboard Driver"); | 185 | MODULE_DESCRIPTION("AAED-2000 Keyboard Driver"); |
186 | MODULE_LICENSE("GPLv2"); | 186 | MODULE_LICENSE("GPL v2"); |
diff --git a/drivers/input/keyboard/atakbd.c b/drivers/input/keyboard/atakbd.c index 4e92100c56a8..1839194ea987 100644 --- a/drivers/input/keyboard/atakbd.c +++ b/drivers/input/keyboard/atakbd.c | |||
@@ -220,7 +220,7 @@ static int __init atakbd_init(void) | |||
220 | int i, error; | 220 | int i, error; |
221 | 221 | ||
222 | if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP)) | 222 | if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP)) |
223 | return -EIO; | 223 | return -ENODEV; |
224 | 224 | ||
225 | // need to init core driver if not already done so | 225 | // need to init core driver if not already done so |
226 | if (atari_keyb_init()) | 226 | if (atari_keyb_init()) |
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index 29fbec6218b9..1aa46ae12630 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c | |||
@@ -412,5 +412,5 @@ module_exit(corgikbd_exit); | |||
412 | 412 | ||
413 | MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); | 413 | MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); |
414 | MODULE_DESCRIPTION("Corgi Keyboard Driver"); | 414 | MODULE_DESCRIPTION("Corgi Keyboard Driver"); |
415 | MODULE_LICENSE("GPLv2"); | 415 | MODULE_LICENSE("GPL v2"); |
416 | MODULE_ALIAS("platform:corgi-keyboard"); | 416 | MODULE_ALIAS("platform:corgi-keyboard"); |
diff --git a/drivers/input/keyboard/hilkbd.c b/drivers/input/keyboard/hilkbd.c index 50d80ecf0b80..aacf71f3cd44 100644 --- a/drivers/input/keyboard/hilkbd.c +++ b/drivers/input/keyboard/hilkbd.c | |||
@@ -217,6 +217,10 @@ hil_keyb_init(void) | |||
217 | return -ENOMEM; | 217 | return -ENOMEM; |
218 | 218 | ||
219 | #if defined(CONFIG_HP300) | 219 | #if defined(CONFIG_HP300) |
220 | if (!MACH_IS_HP300) { | ||
221 | err = -ENODEV; | ||
222 | goto err1; | ||
223 | } | ||
220 | if (!hwreg_present((void *)(HILBASE + HIL_DATA))) { | 224 | if (!hwreg_present((void *)(HILBASE + HIL_DATA))) { |
221 | printk(KERN_ERR "HIL: hardware register was not found\n"); | 225 | printk(KERN_ERR "HIL: hardware register was not found\n"); |
222 | err = -ENODEV; | 226 | err = -ENODEV; |
diff --git a/drivers/input/keyboard/jornada680_kbd.c b/drivers/input/keyboard/jornada680_kbd.c index 9387da343f97..781fc6102860 100644 --- a/drivers/input/keyboard/jornada680_kbd.c +++ b/drivers/input/keyboard/jornada680_kbd.c | |||
@@ -275,5 +275,5 @@ module_exit(jornada680kbd_exit); | |||
275 | 275 | ||
276 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); | 276 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); |
277 | MODULE_DESCRIPTION("HP Jornada 620/660/680/690 Keyboard Driver"); | 277 | MODULE_DESCRIPTION("HP Jornada 620/660/680/690 Keyboard Driver"); |
278 | MODULE_LICENSE("GPLv2"); | 278 | MODULE_LICENSE("GPL v2"); |
279 | MODULE_ALIAS("platform:jornada680_kbd"); | 279 | MODULE_ALIAS("platform:jornada680_kbd"); |
diff --git a/drivers/input/keyboard/jornada720_kbd.c b/drivers/input/keyboard/jornada720_kbd.c index a1164a0c7736..ce650af6d649 100644 --- a/drivers/input/keyboard/jornada720_kbd.c +++ b/drivers/input/keyboard/jornada720_kbd.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | MODULE_AUTHOR("Kristoffer Ericson <Kristoffer.Ericson@gmail.com>"); | 30 | MODULE_AUTHOR("Kristoffer Ericson <Kristoffer.Ericson@gmail.com>"); |
31 | MODULE_DESCRIPTION("HP Jornada 710/720/728 keyboard driver"); | 31 | MODULE_DESCRIPTION("HP Jornada 710/720/728 keyboard driver"); |
32 | MODULE_LICENSE("GPLv2"); | 32 | MODULE_LICENSE("GPL v2"); |
33 | 33 | ||
34 | static unsigned short jornada_std_keymap[128] = { /* ROW */ | 34 | static unsigned short jornada_std_keymap[128] = { /* ROW */ |
35 | 0, KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, /* #1 */ | 35 | 0, KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, /* #1 */ |
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 61e401bc9109..1aa37181c40f 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -494,5 +494,5 @@ module_exit(spitzkbd_exit); | |||
494 | 494 | ||
495 | MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); | 495 | MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); |
496 | MODULE_DESCRIPTION("Spitz Keyboard Driver"); | 496 | MODULE_DESCRIPTION("Spitz Keyboard Driver"); |
497 | MODULE_LICENSE("GPLv2"); | 497 | MODULE_LICENSE("GPL v2"); |
498 | MODULE_ALIAS("platform:spitz-keyboard"); | 498 | MODULE_ALIAS("platform:spitz-keyboard"); |
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index ab76ea442fa5..49d8abfe38fe 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/hp_sdc.h> | 36 | #include <linux/hp_sdc.h> |
37 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
38 | #include <linux/smp_lock.h> | ||
38 | #include <linux/types.h> | 39 | #include <linux/types.h> |
39 | #include <linux/init.h> | 40 | #include <linux/init.h> |
40 | #include <linux/module.h> | 41 | #include <linux/module.h> |
@@ -408,6 +409,7 @@ static unsigned int hp_sdc_rtc_poll(struct file *file, poll_table *wait) | |||
408 | 409 | ||
409 | static int hp_sdc_rtc_open(struct inode *inode, struct file *file) | 410 | static int hp_sdc_rtc_open(struct inode *inode, struct file *file) |
410 | { | 411 | { |
412 | cycle_kernel_lock(); | ||
411 | return 0; | 413 | return 0; |
412 | } | 414 | } |
413 | 415 | ||
@@ -691,6 +693,11 @@ static int __init hp_sdc_rtc_init(void) | |||
691 | { | 693 | { |
692 | int ret; | 694 | int ret; |
693 | 695 | ||
696 | #ifdef __mc68000__ | ||
697 | if (!MACH_IS_HP300) | ||
698 | return -ENODEV; | ||
699 | #endif | ||
700 | |||
694 | init_MUTEX(&i8042tregs); | 701 | init_MUTEX(&i8042tregs); |
695 | 702 | ||
696 | if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) | 703 | if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) |
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index a56ad4ba8fe2..2bcfa0b35061 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/fs.h> | 37 | #include <linux/fs.h> |
38 | #include <linux/miscdevice.h> | 38 | #include <linux/miscdevice.h> |
39 | #include <linux/uinput.h> | 39 | #include <linux/uinput.h> |
40 | #include <linux/smp_lock.h> | ||
40 | 41 | ||
41 | static int uinput_dev_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) | 42 | static int uinput_dev_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) |
42 | { | 43 | { |
@@ -222,6 +223,7 @@ static int uinput_open(struct inode *inode, struct file *file) | |||
222 | if (!newdev) | 223 | if (!newdev) |
223 | return -ENOMEM; | 224 | return -ENOMEM; |
224 | 225 | ||
226 | lock_kernel(); | ||
225 | mutex_init(&newdev->mutex); | 227 | mutex_init(&newdev->mutex); |
226 | spin_lock_init(&newdev->requests_lock); | 228 | spin_lock_init(&newdev->requests_lock); |
227 | init_waitqueue_head(&newdev->requests_waitq); | 229 | init_waitqueue_head(&newdev->requests_waitq); |
@@ -229,6 +231,7 @@ static int uinput_open(struct inode *inode, struct file *file) | |||
229 | newdev->state = UIST_NEW_DEVICE; | 231 | newdev->state = UIST_NEW_DEVICE; |
230 | 232 | ||
231 | file->private_data = newdev; | 233 | file->private_data = newdev; |
234 | unlock_kernel(); | ||
232 | 235 | ||
233 | return 0; | 236 | return 0; |
234 | } | 237 | } |
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index b989748598ae..8137e50ded87 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #define MOUSEDEV_MIX 31 | 14 | #define MOUSEDEV_MIX 31 |
15 | 15 | ||
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <linux/smp_lock.h> | ||
17 | #include <linux/poll.h> | 18 | #include <linux/poll.h> |
18 | #include <linux/module.h> | 19 | #include <linux/module.h> |
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
@@ -545,16 +546,21 @@ static int mousedev_open(struct inode *inode, struct file *file) | |||
545 | if (i >= MOUSEDEV_MINORS) | 546 | if (i >= MOUSEDEV_MINORS) |
546 | return -ENODEV; | 547 | return -ENODEV; |
547 | 548 | ||
549 | lock_kernel(); | ||
548 | error = mutex_lock_interruptible(&mousedev_table_mutex); | 550 | error = mutex_lock_interruptible(&mousedev_table_mutex); |
549 | if (error) | 551 | if (error) { |
552 | unlock_kernel(); | ||
550 | return error; | 553 | return error; |
554 | } | ||
551 | mousedev = mousedev_table[i]; | 555 | mousedev = mousedev_table[i]; |
552 | if (mousedev) | 556 | if (mousedev) |
553 | get_device(&mousedev->dev); | 557 | get_device(&mousedev->dev); |
554 | mutex_unlock(&mousedev_table_mutex); | 558 | mutex_unlock(&mousedev_table_mutex); |
555 | 559 | ||
556 | if (!mousedev) | 560 | if (!mousedev) { |
561 | unlock_kernel(); | ||
557 | return -ENODEV; | 562 | return -ENODEV; |
563 | } | ||
558 | 564 | ||
559 | client = kzalloc(sizeof(struct mousedev_client), GFP_KERNEL); | 565 | client = kzalloc(sizeof(struct mousedev_client), GFP_KERNEL); |
560 | if (!client) { | 566 | if (!client) { |
@@ -573,6 +579,7 @@ static int mousedev_open(struct inode *inode, struct file *file) | |||
573 | goto err_free_client; | 579 | goto err_free_client; |
574 | 580 | ||
575 | file->private_data = client; | 581 | file->private_data = client; |
582 | unlock_kernel(); | ||
576 | return 0; | 583 | return 0; |
577 | 584 | ||
578 | err_free_client: | 585 | err_free_client: |
@@ -580,6 +587,7 @@ static int mousedev_open(struct inode *inode, struct file *file) | |||
580 | kfree(client); | 587 | kfree(client); |
581 | err_put_mousedev: | 588 | err_put_mousedev: |
582 | put_device(&mousedev->dev); | 589 | put_device(&mousedev->dev); |
590 | unlock_kernel(); | ||
583 | return error; | 591 | return error; |
584 | } | 592 | } |
585 | 593 | ||
diff --git a/drivers/input/serio/hp_sdc_mlc.c b/drivers/input/serio/hp_sdc_mlc.c index 6c84f4542cc2..b587e2d576ac 100644 --- a/drivers/input/serio/hp_sdc_mlc.c +++ b/drivers/input/serio/hp_sdc_mlc.c | |||
@@ -306,6 +306,11 @@ static int __init hp_sdc_mlc_init(void) | |||
306 | { | 306 | { |
307 | hil_mlc *mlc = &hp_sdc_mlc; | 307 | hil_mlc *mlc = &hp_sdc_mlc; |
308 | 308 | ||
309 | #ifdef __mc68000__ | ||
310 | if (!MACH_IS_HP300) | ||
311 | return -ENODEV; | ||
312 | #endif | ||
313 | |||
309 | printk(KERN_INFO PREFIX "Registering the System Domain Controller's HIL MLC.\n"); | 314 | printk(KERN_INFO PREFIX "Registering the System Domain Controller's HIL MLC.\n"); |
310 | 315 | ||
311 | hp_sdc_mlc_priv.emtestmode = 0; | 316 | hp_sdc_mlc_priv.emtestmode = 0; |
diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c index ab28cf5949f2..e36a0901646c 100644 --- a/drivers/input/serio/q40kbd.c +++ b/drivers/input/serio/q40kbd.c | |||
@@ -154,7 +154,7 @@ static int __init q40kbd_init(void) | |||
154 | int error; | 154 | int error; |
155 | 155 | ||
156 | if (!MACH_IS_Q40) | 156 | if (!MACH_IS_Q40) |
157 | return -EIO; | 157 | return -ENODEV; |
158 | 158 | ||
159 | error = platform_driver_register(&q40kbd_driver); | 159 | error = platform_driver_register(&q40kbd_driver); |
160 | if (error) | 160 | if (error) |
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 0403622ae267..c9397c8ee97e 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/smp_lock.h> | ||
13 | #include <linux/poll.h> | 14 | #include <linux/poll.h> |
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/serio.h> | 16 | #include <linux/serio.h> |
@@ -81,9 +82,10 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
81 | struct serio_raw_list *list; | 82 | struct serio_raw_list *list; |
82 | int retval = 0; | 83 | int retval = 0; |
83 | 84 | ||
85 | lock_kernel(); | ||
84 | retval = mutex_lock_interruptible(&serio_raw_mutex); | 86 | retval = mutex_lock_interruptible(&serio_raw_mutex); |
85 | if (retval) | 87 | if (retval) |
86 | return retval; | 88 | goto out_bkl; |
87 | 89 | ||
88 | if (!(serio_raw = serio_raw_locate(iminor(inode)))) { | 90 | if (!(serio_raw = serio_raw_locate(iminor(inode)))) { |
89 | retval = -ENODEV; | 91 | retval = -ENODEV; |
@@ -108,6 +110,8 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
108 | 110 | ||
109 | out: | 111 | out: |
110 | mutex_unlock(&serio_raw_mutex); | 112 | mutex_unlock(&serio_raw_mutex); |
113 | out_bkl: | ||
114 | unlock_kernel(); | ||
111 | return retval; | 115 | return retval; |
112 | } | 116 | } |
113 | 117 | ||
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c index 7ff71ba7b7c9..b9694b6445d0 100644 --- a/drivers/input/serio/serport.c +++ b/drivers/input/serio/serport.c | |||
@@ -216,7 +216,7 @@ static void serport_ldisc_write_wakeup(struct tty_struct * tty) | |||
216 | * The line discipline structure. | 216 | * The line discipline structure. |
217 | */ | 217 | */ |
218 | 218 | ||
219 | static struct tty_ldisc serport_ldisc = { | 219 | static struct tty_ldisc_ops serport_ldisc = { |
220 | .owner = THIS_MODULE, | 220 | .owner = THIS_MODULE, |
221 | .name = "input", | 221 | .name = "input", |
222 | .open = serport_ldisc_open, | 222 | .open = serport_ldisc_open, |
diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c index 742242111bf1..1aca108b1031 100644 --- a/drivers/input/touchscreen/jornada720_ts.c +++ b/drivers/input/touchscreen/jornada720_ts.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); | 25 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); |
26 | MODULE_DESCRIPTION("HP Jornada 710/720/728 touchscreen driver"); | 26 | MODULE_DESCRIPTION("HP Jornada 710/720/728 touchscreen driver"); |
27 | MODULE_LICENSE("GPLv2"); | 27 | MODULE_LICENSE("GPL v2"); |
28 | 28 | ||
29 | struct jornada_ts { | 29 | struct jornada_ts { |
30 | struct input_dev *dev; | 30 | struct input_dev *dev; |
diff --git a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c index 0f47f4697cdf..9ce3b3baf3a2 100644 --- a/drivers/input/xen-kbdfront.c +++ b/drivers/input/xen-kbdfront.c | |||
@@ -66,6 +66,9 @@ static irqreturn_t input_handler(int rq, void *dev_id) | |||
66 | case XENKBD_TYPE_MOTION: | 66 | case XENKBD_TYPE_MOTION: |
67 | input_report_rel(dev, REL_X, event->motion.rel_x); | 67 | input_report_rel(dev, REL_X, event->motion.rel_x); |
68 | input_report_rel(dev, REL_Y, event->motion.rel_y); | 68 | input_report_rel(dev, REL_Y, event->motion.rel_y); |
69 | if (event->motion.rel_z) | ||
70 | input_report_rel(dev, REL_WHEEL, | ||
71 | -event->motion.rel_z); | ||
69 | break; | 72 | break; |
70 | case XENKBD_TYPE_KEY: | 73 | case XENKBD_TYPE_KEY: |
71 | dev = NULL; | 74 | dev = NULL; |
@@ -84,6 +87,9 @@ static irqreturn_t input_handler(int rq, void *dev_id) | |||
84 | case XENKBD_TYPE_POS: | 87 | case XENKBD_TYPE_POS: |
85 | input_report_abs(dev, ABS_X, event->pos.abs_x); | 88 | input_report_abs(dev, ABS_X, event->pos.abs_x); |
86 | input_report_abs(dev, ABS_Y, event->pos.abs_y); | 89 | input_report_abs(dev, ABS_Y, event->pos.abs_y); |
90 | if (event->pos.rel_z) | ||
91 | input_report_rel(dev, REL_WHEEL, | ||
92 | -event->pos.rel_z); | ||
87 | break; | 93 | break; |
88 | } | 94 | } |
89 | if (dev) | 95 | if (dev) |
@@ -152,7 +158,7 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev, | |||
152 | ptr->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS); | 158 | ptr->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS); |
153 | for (i = BTN_LEFT; i <= BTN_TASK; i++) | 159 | for (i = BTN_LEFT; i <= BTN_TASK; i++) |
154 | set_bit(i, ptr->keybit); | 160 | set_bit(i, ptr->keybit); |
155 | ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y); | 161 | ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y) | BIT(REL_WHEEL); |
156 | input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0); | 162 | input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0); |
157 | input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0); | 163 | input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0); |
158 | 164 | ||
@@ -294,6 +300,16 @@ InitWait: | |||
294 | */ | 300 | */ |
295 | if (dev->state != XenbusStateConnected) | 301 | if (dev->state != XenbusStateConnected) |
296 | goto InitWait; /* no InitWait seen yet, fudge it */ | 302 | goto InitWait; /* no InitWait seen yet, fudge it */ |
303 | |||
304 | /* Set input abs params to match backend screen res */ | ||
305 | if (xenbus_scanf(XBT_NIL, info->xbdev->otherend, | ||
306 | "width", "%d", &val) > 0) | ||
307 | input_set_abs_params(info->ptr, ABS_X, 0, val, 0, 0); | ||
308 | |||
309 | if (xenbus_scanf(XBT_NIL, info->xbdev->otherend, | ||
310 | "height", "%d", &val) > 0) | ||
311 | input_set_abs_params(info->ptr, ABS_Y, 0, val, 0, 0); | ||
312 | |||
297 | break; | 313 | break; |
298 | 314 | ||
299 | case XenbusStateClosing: | 315 | case XenbusStateClosing: |
@@ -337,4 +353,6 @@ static void __exit xenkbd_cleanup(void) | |||
337 | module_init(xenkbd_init); | 353 | module_init(xenkbd_init); |
338 | module_exit(xenkbd_cleanup); | 354 | module_exit(xenkbd_cleanup); |
339 | 355 | ||
356 | MODULE_DESCRIPTION("Xen virtual keyboard/pointer device frontend"); | ||
340 | MODULE_LICENSE("GPL"); | 357 | MODULE_LICENSE("GPL"); |
358 | MODULE_ALIAS("xen:vkbd"); | ||