aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mousedev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mousedev.c')
-rw-r--r--drivers/input/mousedev.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index 062848ac7e6b..c6194a9dd174 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
265static void mousedev_touchpad_touch(struct mousedev *mousedev, int value) 269static void mousedev_touchpad_touch(struct mousedev *mousedev, int value)