From: Dmitry Torokhov Date: Wed, 4 Mar 2009 08:52:20 +0000 (-0800) Subject: Input: fix polling of /proc/bus/input/devices X-Git-Tag: v2.6.30-rc2~71^2^2~14 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fa88661224946145819a904cef2ec7dd5c9c78bc;p=karo-tx-linux.git Input: fix polling of /proc/bus/input/devices Tested-by: Alessio Sangalli Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/input.c b/drivers/input/input.c index 46e9ce195064..913392f63f76 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -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; }