Skip to content

Commit

Permalink
Input: mousedev - do not wake up readers when receiving 0-motion
Browse files Browse the repository at this point in the history
       event.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed Jun 1, 2005
1 parent e334016 commit 8121152
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/input/mousedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8121152

Please sign in to comment.