diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-04-08 09:00:33 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-04-08 09:00:33 +0200 |
commit | ba28f22e7cf16cb310bb491cbb3f7d0d5d1f5c5d (patch) | |
tree | 6d58e91731385281436da191e82c56cd1627482f /drivers/input/input.c | |
parent | Linux 2.6.30-rc1 (diff) | |
parent | Input: i8042 - add HP DV9700 to the noloop list (diff) | |
download | linux-ba28f22e7cf16cb310bb491cbb3f7d0d5d1f5c5d.tar.xz linux-ba28f22e7cf16cb310bb491cbb3f7d0d5d1f5c5d.zip |
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index ec3db3ade118..d44065d2e662 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; } |