]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Input: ALPS - fix TrackStick Y axis handling for SS5 hardware
authorPaul Donohue <linux-kernel@PaulSD.com>
Tue, 3 Jan 2017 18:39:28 +0000 (10:39 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 3 Jan 2017 20:33:10 +0000 (12:33 -0800)
A minus character was lost in commit 23fce365, causing the Y axis to be
inverted for SS5 TrackStick events.  (Pushing the TrackStick up caused
the pointer to move down, and vice versa.)  Restore the lost minus.

Fixes: 23fce365c6a2 ("Input: ALPS - clean up code for SS5 hardware")
Signed-off-by: Paul Donohue <linux-kernel@PaulSD.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/alps.h

index cde6f4bd8ea2e3f0f70fbccf3f684e5cd079ec04..6d279aa27cb9a10d70a2e732fe9599297883cbc0 100644 (file)
@@ -114,7 +114,7 @@ enum SS4_PACKET_ID {
                                 (_b[1] & 0x7F)         \
                                )
 
-#define SS4_TS_Y_V2(_b)                (s8)(                           \
+#define SS4_TS_Y_V2(_b)                -(s8)(                          \
                                 ((_b[3] & 0x01) << 7) |        \
                                 (_b[2] & 0x7F)         \
                                )