Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Jun 2011 15:59:46 +0000 (08:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Jun 2011 15:59:46 +0000 (08:59 -0700)
* '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.

drivers/input/evdev.c
drivers/input/input.c
drivers/input/keyboard/omap-keypad.c
drivers/input/keyboard/sh_keysc.c
drivers/input/mousedev.c
include/linux/input/sh_keysc.h

index be0921e..4cf2534 100644 (file)
@@ -111,7 +111,8 @@ static void evdev_event(struct input_handle *handle,
 
        rcu_read_unlock();
 
-       wake_up_interruptible(&evdev->wait);
+       if (type == EV_SYN && code == SYN_REPORT)
+               wake_up_interruptible(&evdev->wait);
 }
 
 static int evdev_fasync(int fd, struct file *file, int on)
index 75e11c7..da38d97 100644 (file)
@@ -1756,7 +1756,7 @@ static unsigned int input_estimate_events_per_packet(struct input_dev *dev)
        } else if (test_bit(ABS_MT_TRACKING_ID, dev->absbit)) {
                mt_slots = dev->absinfo[ABS_MT_TRACKING_ID].maximum -
                           dev->absinfo[ABS_MT_TRACKING_ID].minimum + 1,
-               clamp(mt_slots, 2, 32);
+               mt_slots = clamp(mt_slots, 2, 32);
        } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) {
                mt_slots = 2;
        } else {
index f23a743..33d0bdc 100644 (file)
@@ -209,6 +209,7 @@ static void omap_kp_tasklet(unsigned long data)
 #endif
                }
        }
+       input_sync(omap_kp_data->input);
        memcpy(keypad_state, new_state, sizeof(keypad_state));
 
        if (key_down) {
index 834cf98..6876700 100644 (file)
@@ -32,7 +32,7 @@ static const struct {
        [SH_KEYSC_MODE_3] = { 2, 4, 7 },
        [SH_KEYSC_MODE_4] = { 3, 6, 6 },
        [SH_KEYSC_MODE_5] = { 4, 6, 7 },
-       [SH_KEYSC_MODE_6] = { 5, 7, 7 },
+       [SH_KEYSC_MODE_6] = { 5, 8, 8 },
 };
 
 struct sh_keysc_priv {
index 257e033..0110b5a 100644 (file)
@@ -187,7 +187,7 @@ static void mousedev_abs_event(struct input_dev *dev, struct mousedev *mousedev,
                if (size == 0)
                        size = xres ? : 1;
 
-               clamp(value, min, max);
+               value = clamp(value, min, max);
 
                mousedev->packet.x = ((value - min) * xres) / size;
                mousedev->packet.abs_event = 1;
@@ -201,7 +201,7 @@ static void mousedev_abs_event(struct input_dev *dev, struct mousedev *mousedev,
                if (size == 0)
                        size = yres ? : 1;
 
-               clamp(value, min, max);
+               value = clamp(value, min, max);
 
                mousedev->packet.y = yres - ((value - min) * yres) / size;
                mousedev->packet.abs_event = 1;
index 649dc7f..5d253cd 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SH_KEYSC_H__
 #define __SH_KEYSC_H__
 
-#define SH_KEYSC_MAXKEYS 49
+#define SH_KEYSC_MAXKEYS 64
 
 struct sh_keysc_info {
        enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3,