Skip to content

Commit

Permalink
Input: fix polling of /proc/bus/input/devices
Browse files Browse the repository at this point in the history
Tested-by: Alessio Sangalli <alesan@manoweb.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed Mar 8, 2009
1 parent d15c22e commit fa88661
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fa88661

Please sign in to comment.