Commit e9c421e2 authored by Peter Osterlund's avatar Peter Osterlund Committed by Linus Torvalds

[PATCH] Make mousedev.c report all events to user space immediately

mousedev_packet() clears list->ready too early when called with
"tail == head - 1".  The effect is that the last mouse event from the
hardware isn't reported to userspace until another hardware mouse
event arrives.  This can make the left mouse button get stuck when
tapping on a touchpad.  When this happens, the butten doesn't unstick
until you interact with the touchpad again.
Signed-off-by: default avatarPeter Osterlund <petero2@telia.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c5fa06a3
...@@ -467,10 +467,10 @@ static void mousedev_packet(struct mousedev_list *list, signed char *ps2_data) ...@@ -467,10 +467,10 @@ static void mousedev_packet(struct mousedev_list *list, signed char *ps2_data)
} }
if (!p->dx && !p->dy && !p->dz) { if (!p->dx && !p->dy && !p->dz) {
if (list->tail != list->head)
list->tail = (list->tail + 1) % PACKET_QUEUE_LEN;
if (list->tail == list->head) if (list->tail == list->head)
list->ready = 0; list->ready = 0;
else
list->tail = (list->tail + 1) % PACKET_QUEUE_LEN;
} }
spin_unlock_irqrestore(&list->packet_lock, flags); spin_unlock_irqrestore(&list->packet_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment