diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-06-01 03:39:36 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-06-01 03:39:36 -0400 |
commit | 8121152c1770ef1cd029030d51802c65c489950d (patch) | |
tree | 11064cc56bc287d704f41cec59b56934331e31c7 /drivers/input/mousedev.c | |
parent | e334016fc1735e491385e14157a0360cd85c321b (diff) |
Input: mousedev - do not wake up readers when receiving 0-motion
event.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mousedev.c')
-rw-r--r-- | drivers/input/mousedev.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 96fb9870834a..08b191180af0 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -220,6 +220,7 @@ static void mousedev_notify_readers(struct mousedev *mousedev, struct mousedev_h | |||
220 | struct mousedev_list *list; | 220 | struct mousedev_list *list; |
221 | struct mousedev_motion *p; | 221 | struct mousedev_motion *p; |
222 | unsigned long flags; | 222 | unsigned long flags; |
223 | int wake_readers = 0; | ||
223 | 224 | ||
224 | list_for_each_entry(list, &mousedev->list, node) { | 225 | list_for_each_entry(list, &mousedev->list, node) { |
225 | spin_lock_irqsave(&list->packet_lock, flags); | 226 | spin_lock_irqsave(&list->packet_lock, flags); |
@@ -255,11 +256,14 @@ static void mousedev_notify_readers(struct mousedev *mousedev, struct mousedev_h | |||
255 | 256 | ||
256 | spin_unlock_irqrestore(&list->packet_lock, flags); | 257 | spin_unlock_irqrestore(&list->packet_lock, flags); |
257 | 258 | ||
258 | if (list->ready) | 259 | if (list->ready) { |
259 | kill_fasync(&list->fasync, SIGIO, POLL_IN); | 260 | kill_fasync(&list->fasync, SIGIO, POLL_IN); |
261 | wake_readers = 1; | ||
262 | } | ||
260 | } | 263 | } |
261 | 264 | ||
262 | wake_up_interruptible(&mousedev->wait); | 265 | if (wake_readers) |
266 | wake_up_interruptible(&mousedev->wait); | ||
263 | } | 267 | } |
264 | 268 | ||
265 | static void mousedev_touchpad_touch(struct mousedev *mousedev, int value) | 269 | static void mousedev_touchpad_touch(struct mousedev *mousedev, int value) |