summaryrefslogtreecommitdiffstats
path: root/drivers/input/input.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-04-08 00:00:33 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-04-08 00:00:33 -0700
commitba28f22e7cf16cb310bb491cbb3f7d0d5d1f5c5d (patch)
tree6d58e91731385281436da191e82c56cd1627482f /drivers/input/input.c
parent577c9c456f0e1371cbade38eaf91ae8e8a308555 (diff)
parent59cc1dd97ca9ac0363ef2f770901fbd86e2b970a (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index ec3db3ade11..d44065d2e66 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -132,6 +132,11 @@ static void input_start_autorepeat(struct input_dev *dev, int code)
}
}
+static void input_stop_autorepeat(struct input_dev *dev)
+{
+ del_timer(&dev->timer);
+}
+
#define INPUT_IGNORE_EVENT 0
#define INPUT_PASS_TO_HANDLERS 1
#define INPUT_PASS_TO_DEVICE 2
@@ -167,6 +172,8 @@ static void input_handle_event(struct input_dev *dev,
__change_bit(code, dev->key);
if (value)
input_start_autorepeat(dev, code);
+ else
+ input_stop_autorepeat(dev);
}
disposition = INPUT_PASS_TO_HANDLERS;
@@ -737,11 +744,11 @@ static inline void input_wakeup_procfs_readers(void)
static unsigned int input_proc_devices_poll(struct file *file, poll_table *wait)
{
- int state = input_devices_state;
-
poll_wait(file, &input_devices_poll_wait, wait);
- if (state != input_devices_state)
+ if (file->f_version != input_devices_state) {
+ file->f_version = input_devices_state;
return POLLIN | POLLRDNORM;
+ }
return 0;
}