X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Finput%2Finput.c;h=d44065d2e662d7fc6757986c4c91b89b5b7b8ebd;hb=ba28f22e7cf16cb310bb491cbb3f7d0d5d1f5c5d;hp=ec3db3ade1182b01ef663a946c85de10efa54023;hpb=577c9c456f0e1371cbade38eaf91ae8e8a308555;p=karo-tx-linux.git 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; }