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 46e9ce1..913392f 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;
 }