diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-20 11:59:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-20 11:59:46 -0400 |
commit | c01ad4081939f91ebd7277e8e731fd90ceb3e632 (patch) | |
tree | 8eb0eccce6e0681400ddb5e33a9f13bfeb8a1fde /drivers/input | |
parent | 90a800de0a29426ea900ecd53f2929d5f4bc4578 (diff) | |
parent | cca23d0b5350c9ca0473625c3f5879422ba534a6 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: sh_keysc - 8x8 MODE_6 fix
Input: omap-keypad - add missing input_sync()
Input: evdev - try to wake up readers only if we have full packet
Input: properly assign return value of clamp() macro.
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/evdev.c | 3 | ||||
-rw-r--r-- | drivers/input/input.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/omap-keypad.c | 1 | ||||
-rw-r--r-- | drivers/input/keyboard/sh_keysc.c | 2 | ||||
-rw-r--r-- | drivers/input/mousedev.c | 4 |
5 files changed, 7 insertions, 5 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index be0921ef6b52..4cf25347b015 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -111,7 +111,8 @@ static void evdev_event(struct input_handle *handle, | |||
111 | 111 | ||
112 | rcu_read_unlock(); | 112 | rcu_read_unlock(); |
113 | 113 | ||
114 | wake_up_interruptible(&evdev->wait); | 114 | if (type == EV_SYN && code == SYN_REPORT) |
115 | wake_up_interruptible(&evdev->wait); | ||
115 | } | 116 | } |
116 | 117 | ||
117 | static int evdev_fasync(int fd, struct file *file, int on) | 118 | static int evdev_fasync(int fd, struct file *file, int on) |
diff --git a/drivers/input/input.c b/drivers/input/input.c index 75e11c7b70fd..da38d97a51b1 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -1756,7 +1756,7 @@ static unsigned int input_estimate_events_per_packet(struct input_dev *dev) | |||
1756 | } else if (test_bit(ABS_MT_TRACKING_ID, dev->absbit)) { | 1756 | } else if (test_bit(ABS_MT_TRACKING_ID, dev->absbit)) { |
1757 | mt_slots = dev->absinfo[ABS_MT_TRACKING_ID].maximum - | 1757 | mt_slots = dev->absinfo[ABS_MT_TRACKING_ID].maximum - |
1758 | dev->absinfo[ABS_MT_TRACKING_ID].minimum + 1, | 1758 | dev->absinfo[ABS_MT_TRACKING_ID].minimum + 1, |
1759 | clamp(mt_slots, 2, 32); | 1759 | mt_slots = clamp(mt_slots, 2, 32); |
1760 | } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) { | 1760 | } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) { |
1761 | mt_slots = 2; | 1761 | mt_slots = 2; |
1762 | } else { | 1762 | } else { |
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index f23a743817db..33d0bdc837c0 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c | |||
@@ -209,6 +209,7 @@ static void omap_kp_tasklet(unsigned long data) | |||
209 | #endif | 209 | #endif |
210 | } | 210 | } |
211 | } | 211 | } |
212 | input_sync(omap_kp_data->input); | ||
212 | memcpy(keypad_state, new_state, sizeof(keypad_state)); | 213 | memcpy(keypad_state, new_state, sizeof(keypad_state)); |
213 | 214 | ||
214 | if (key_down) { | 215 | if (key_down) { |
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c index 834cf98e7efb..6876700a4469 100644 --- a/drivers/input/keyboard/sh_keysc.c +++ b/drivers/input/keyboard/sh_keysc.c | |||
@@ -32,7 +32,7 @@ static const struct { | |||
32 | [SH_KEYSC_MODE_3] = { 2, 4, 7 }, | 32 | [SH_KEYSC_MODE_3] = { 2, 4, 7 }, |
33 | [SH_KEYSC_MODE_4] = { 3, 6, 6 }, | 33 | [SH_KEYSC_MODE_4] = { 3, 6, 6 }, |
34 | [SH_KEYSC_MODE_5] = { 4, 6, 7 }, | 34 | [SH_KEYSC_MODE_5] = { 4, 6, 7 }, |
35 | [SH_KEYSC_MODE_6] = { 5, 7, 7 }, | 35 | [SH_KEYSC_MODE_6] = { 5, 8, 8 }, |
36 | }; | 36 | }; |
37 | 37 | ||
38 | struct sh_keysc_priv { | 38 | struct sh_keysc_priv { |
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 257e033986e4..0110b5a3a167 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -187,7 +187,7 @@ static void mousedev_abs_event(struct input_dev *dev, struct mousedev *mousedev, | |||
187 | if (size == 0) | 187 | if (size == 0) |
188 | size = xres ? : 1; | 188 | size = xres ? : 1; |
189 | 189 | ||
190 | clamp(value, min, max); | 190 | value = clamp(value, min, max); |
191 | 191 | ||
192 | mousedev->packet.x = ((value - min) * xres) / size; | 192 | mousedev->packet.x = ((value - min) * xres) / size; |
193 | mousedev->packet.abs_event = 1; | 193 | mousedev->packet.abs_event = 1; |
@@ -201,7 +201,7 @@ static void mousedev_abs_event(struct input_dev *dev, struct mousedev *mousedev, | |||
201 | if (size == 0) | 201 | if (size == 0) |
202 | size = yres ? : 1; | 202 | size = yres ? : 1; |
203 | 203 | ||
204 | clamp(value, min, max); | 204 | value = clamp(value, min, max); |
205 | 205 | ||
206 | mousedev->packet.y = yres - ((value - min) * yres) / size; | 206 | mousedev->packet.y = yres - ((value - min) * yres) / size; |
207 | mousedev->packet.abs_event = 1; | 207 | mousedev->packet.abs_event = 1; |