diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-11-20 02:33:07 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-11-25 03:42:13 -0500 |
commit | d0ab54783f2de0c216115333eca1a8d3d5c3e75b (patch) | |
tree | a4c8f2cb65c0f7c844332e9819ad6973ee32d1ff | |
parent | bce4f9e764c36bc35dd5c9cf9e057c09f422397d (diff) |
Input: elantech - trust firmware about trackpoint presence
Only try to parse data as coming from trackpoint if firmware told us that
trackpoint is present.
Fixes commit caeb0d37fa3e387eb0dd22e5d497523c002033d1
Reported-and-tested-by: Marcus Overhagen <marcus.overhagen@gmail.com>
Reported-and-tested-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/mouse/elantech.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 3fcb6b3cb0bd..f2b978026407 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
@@ -428,14 +428,6 @@ static void elantech_report_trackpoint(struct psmouse *psmouse, | |||
428 | int x, y; | 428 | int x, y; |
429 | u32 t; | 429 | u32 t; |
430 | 430 | ||
431 | if (dev_WARN_ONCE(&psmouse->ps2dev.serio->dev, | ||
432 | !tp_dev, | ||
433 | psmouse_fmt("Unexpected trackpoint message\n"))) { | ||
434 | if (etd->debug == 1) | ||
435 | elantech_packet_dump(psmouse); | ||
436 | return; | ||
437 | } | ||
438 | |||
439 | t = get_unaligned_le32(&packet[0]); | 431 | t = get_unaligned_le32(&packet[0]); |
440 | 432 | ||
441 | switch (t & ~7U) { | 433 | switch (t & ~7U) { |
@@ -793,7 +785,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse) | |||
793 | unsigned char packet_type = packet[3] & 0x03; | 785 | unsigned char packet_type = packet[3] & 0x03; |
794 | bool sanity_check; | 786 | bool sanity_check; |
795 | 787 | ||
796 | if ((packet[3] & 0x0f) == 0x06) | 788 | if (etd->tp_dev && (packet[3] & 0x0f) == 0x06) |
797 | return PACKET_TRACKPOINT; | 789 | return PACKET_TRACKPOINT; |
798 | 790 | ||
799 | /* | 791 | /* |