diff options
author | ??? <kt.liao@emc.com.tw> | 2018-06-21 17:15:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-03 11:25:04 +0200 |
commit | 3d1de95138fbf54bab0049ae669299e3f1a4c4fe (patch) | |
tree | eb1cd6b9e7152b00bbd8f980c9c86268c435aa32 /drivers | |
parent | 524a0c6f2efde4262356de3d31769439abb27cb5 (diff) | |
download | linux-stable-3d1de95138fbf54bab0049ae669299e3f1a4c4fe.tar.gz linux-stable-3d1de95138fbf54bab0049ae669299e3f1a4c4fe.tar.bz2 linux-stable-3d1de95138fbf54bab0049ae669299e3f1a4c4fe.zip |
Input: elantech - fix V4 report decoding for module with middle key
commit e0ae2519ca004a628fa55aeef969c37edce522d3 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/mouse/elantech.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 6b7e98f498aa..a250f433eb96 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -804,7 +804,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse) else if (ic_version == 7 && etd->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) |