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 | |
| 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.
| -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 | ||||
| -rw-r--r-- | include/linux/input/sh_keysc.h | 2 |
6 files changed, 8 insertions, 6 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; |
diff --git a/include/linux/input/sh_keysc.h b/include/linux/input/sh_keysc.h index 649dc7f12925..5d253cd93691 100644 --- a/include/linux/input/sh_keysc.h +++ b/include/linux/input/sh_keysc.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #ifndef __SH_KEYSC_H__ | 1 | #ifndef __SH_KEYSC_H__ |
| 2 | #define __SH_KEYSC_H__ | 2 | #define __SH_KEYSC_H__ |
| 3 | 3 | ||
| 4 | #define SH_KEYSC_MAXKEYS 49 | 4 | #define SH_KEYSC_MAXKEYS 64 |
| 5 | 5 | ||
| 6 | struct sh_keysc_info { | 6 | struct sh_keysc_info { |
| 7 | enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3, | 7 | enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3, |
