diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2018-04-24 01:25:58 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-04-24 01:38:16 +0200 |
commit | 9c71b2c53bf56efa2f8aeab4247a86c0178fdcd7 (patch) | |
tree | 5568498bd7d2fa4be06b18259c894b2fdcbc93ad | |
parent | Input: leds - fix out of bound access (diff) | |
download | linux-9c71b2c53bf56efa2f8aeab4247a86c0178fdcd7.tar.xz linux-9c71b2c53bf56efa2f8aeab4247a86c0178fdcd7.zip |
Input: alps - fix reporting pressure of v3 trackstick
According to documentation, all 7 lower bits represents trackpoint pressure.
Fixes: 4621c9660459 ("Input: alps - report pressure of v3 and v7 trackstick")
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/mouse/alps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 0a67f235ba88..38f9501acdf0 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -583,7 +583,7 @@ static void alps_process_trackstick_packet_v3(struct psmouse *psmouse) x = (s8)(((packet[0] & 0x20) << 2) | (packet[1] & 0x7f)); y = (s8)(((packet[0] & 0x10) << 3) | (packet[2] & 0x7f)); - z = packet[4] & 0x7c; + z = packet[4] & 0x7f; /* * The x and y values tend to be quite large, and when used |