From: Peter Osterlund mousedev_packet() incorrectly clears list->ready when called with "tail == head - 1". The effect is that the last mouse event from the hardware isn't reported to user space until another hardware mouse event arrives. This can make the left mouse button get stuck when tapping on a touchpad. When this happens, the button doesn't unstick until the next time you interact with the touchpad. Signed-off-by: Peter Osterlund Signed-off-by: Andrew Morton --- 25-akpm/drivers/input/mousedev.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/input/mousedev.c~input-make-mousedevc-report-all-events-to-user-space-immediately drivers/input/mousedev.c --- 25/drivers/input/mousedev.c~input-make-mousedevc-report-all-events-to-user-space-immediately 2005-02-02 15:08:07.792429544 -0800 +++ 25-akpm/drivers/input/mousedev.c 2005-02-02 15:08:07.795429088 -0800 @@ -467,10 +467,10 @@ static void mousedev_packet(struct mouse } 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) list->ready = 0; + else + list->tail = (list->tail + 1) % PACKET_QUEUE_LEN; } spin_unlock_irqrestore(&list->packet_lock, flags); _