diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-06-01 02:39:36 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-06-01 02:39:36 -0500 |
commit | 8121152c1770ef1cd029030d51802c65c489950d (patch) | |
tree | 11064cc56bc287d704f41cec59b56934331e31c7 /drivers/input | |
parent | e334016fc1735e491385e14157a0360cd85c321b (diff) | |
download | op-kernel-dev-8121152c1770ef1cd029030d51802c65c489950d.zip op-kernel-dev-8121152c1770ef1cd029030d51802c65c489950d.tar.gz |
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')
-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 96fb987..08b1911 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 struct mousedev_list *list; struct mousedev_motion *p; unsigned long flags; + int wake_readers = 0; list_for_each_entry(list, &mousedev->list, node) { spin_lock_irqsave(&list->packet_lock, flags); @@ -255,11 +256,14 @@ static void mousedev_notify_readers(struct mousedev *mousedev, struct mousedev_h spin_unlock_irqrestore(&list->packet_lock, flags); - if (list->ready) + if (list->ready) { kill_fasync(&list->fasync, SIGIO, POLL_IN); + wake_readers = 1; + } } - wake_up_interruptible(&mousedev->wait); + if (wake_readers) + wake_up_interruptible(&mousedev->wait); } static void mousedev_touchpad_touch(struct mousedev *mousedev, int value) |