summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
author??? <kt.liao@emc.com.tw>2018-06-22 03:15:32 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-06-22 03:20:11 +0300
commite0ae2519ca004a628fa55aeef969c37edce522d3 (patch)
treefb652054b8b05e42b992e3cee5c31f27dccebc99 /drivers/input
parent24bb555e6e46d96e2a954aa0295029a81cc9bbaa (diff)
downloadlinux-e0ae2519ca004a628fa55aeef969c37edce522d3.tar.xz
Input: elantech - fix V4 report decoding for module with middle key
Some touchpad has middle key and it will be indicated in bit 2 of packet[0]. We need to fix V4 formation's byte mask to prevent error decoding. Signed-off-by: KT Liao <kt.liao@emc.com.tw> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/elantech.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 4c52e43c9273..dd85b16dc6f8 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -799,7 +799,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)
else if (ic_version == 7 && etd->info.samples[1] == 0x2A)
sanity_check = ((packet[3] & 0x1c) == 0x10);
else
- sanity_check = ((packet[0] & 0x0c) == 0x04 &&
+ sanity_check = ((packet[0] & 0x08) == 0x00 &&
(packet[3] & 0x1c) == 0x10);
if (!sanity_check)