diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-04-08 03:00:33 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-04-08 03:00:33 -0400 |
commit | ba28f22e7cf16cb310bb491cbb3f7d0d5d1f5c5d (patch) | |
tree | 6d58e91731385281436da191e82c56cd1627482f /drivers/input/input.c | |
parent | 577c9c456f0e1371cbade38eaf91ae8e8a308555 (diff) | |
parent | 59cc1dd97ca9ac0363ef2f770901fbd86e2b970a (diff) |
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) | |||
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | static void input_stop_autorepeat(struct input_dev *dev) | ||
136 | { | ||
137 | del_timer(&dev->timer); | ||
138 | } | ||
139 | |||
135 | #define INPUT_IGNORE_EVENT 0 | 140 | #define INPUT_IGNORE_EVENT 0 |
136 | #define INPUT_PASS_TO_HANDLERS 1 | 141 | #define INPUT_PASS_TO_HANDLERS 1 |
137 | #define INPUT_PASS_TO_DEVICE 2 | 142 | #define INPUT_PASS_TO_DEVICE 2 |
@@ -167,6 +172,8 @@ static void input_handle_event(struct input_dev *dev, | |||
167 | __change_bit(code, dev->key); | 172 | __change_bit(code, dev->key); |
168 | if (value) | 173 | if (value) |
169 | input_start_autorepeat(dev, code); | 174 | input_start_autorepeat(dev, code); |
175 | else | ||
176 | input_stop_autorepeat(dev); | ||
170 | } | 177 | } |
171 | 178 | ||
172 | disposition = INPUT_PASS_TO_HANDLERS; | 179 | disposition = INPUT_PASS_TO_HANDLERS; |
@@ -737,11 +744,11 @@ static inline void input_wakeup_procfs_readers(void) | |||
737 | 744 | ||
738 | static unsigned int input_proc_devices_poll(struct file *file, poll_table *wait) | 745 | static unsigned int input_proc_devices_poll(struct file *file, poll_table *wait) |
739 | { | 746 | { |
740 | int state = input_devices_state; | ||
741 | |||
742 | poll_wait(file, &input_devices_poll_wait, wait); | 747 | poll_wait(file, &input_devices_poll_wait, wait); |
743 | if (state != input_devices_state) | 748 | if (file->f_version != input_devices_state) { |
749 | file->f_version = input_devices_state; | ||
744 | return POLLIN | POLLRDNORM; | 750 | return POLLIN | POLLRDNORM; |
751 | } | ||
745 | 752 | ||
746 | return 0; | 753 | return 0; |
747 | } | 754 | } |