diff options
author | Daniel Drake <dsd@laptop.org> | 2010-11-15 04:28:54 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-11-15 04:33:47 -0500 |
commit | 67f56bb0f4997b55291c162077e02e4f29639fc2 (patch) | |
tree | b12990c21c48da67a642410888c5e823e2b2f172 /drivers | |
parent | 87abb6bbdbcfbced2ce0bcad68dd89ac3ff9464b (diff) |
Input: hgpk - detect simple mode overflows
Based on work by Paul Fox.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/mouse/hgpk.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c index b54f074ec307..7f6cb32d177a 100644 --- a/drivers/input/mouse/hgpk.c +++ b/drivers/input/mouse/hgpk.c | |||
@@ -431,6 +431,11 @@ static void hgpk_process_simple_packet(struct psmouse *psmouse) | |||
431 | int x = packet[1] - ((packet[0] << 4) & 0x100); | 431 | int x = packet[1] - ((packet[0] << 4) & 0x100); |
432 | int y = ((packet[0] << 3) & 0x100) - packet[2]; | 432 | int y = ((packet[0] << 3) & 0x100) - packet[2]; |
433 | 433 | ||
434 | if (packet[0] & 0xc0) | ||
435 | hgpk_dbg(psmouse, | ||
436 | "overflow -- 0x%02x 0x%02x 0x%02x\n", | ||
437 | packet[0], packet[1], packet[2]); | ||
438 | |||
434 | if (hgpk_discard_decay_hack(psmouse, x, y)) { | 439 | if (hgpk_discard_decay_hack(psmouse, x, y)) { |
435 | if (tpdebug) | 440 | if (tpdebug) |
436 | hgpk_dbg(psmouse, "discarding\n"); | 441 | hgpk_dbg(psmouse, "discarding\n"); |