]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Input: fix polling of /proc/bus/input/devices
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 4 Mar 2009 08:52:20 +0000 (00:52 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 8 Mar 2009 23:34:55 +0000 (16:34 -0700)
Tested-by: Alessio Sangalli <alesan@manoweb.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/input.c

index 46e9ce195064704fbb55a5d7c796d5974289aa28..913392f63f767b62763197687fe63ff559a2b60e 100644 (file)
@@ -744,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;
 }