diff options
author | Andreas Bosch <linux@progandy.de> | 2014-10-15 13:44:50 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-10-15 13:57:19 -0400 |
commit | b0cfb794a3dd1d699f3e453f9180bd06508fb8f0 (patch) | |
tree | 2a53b17119ffa56c8621098b9043159b9c105393 /drivers/input | |
parent | 4af6600fd793023c01634cca5abfe4a2b707788f (diff) |
Input: alps - fix v4 button press recognition
Since the change to struct input_mt_pos some variables are now bitfields
instead of integers. Automatic conversion from integer to bitfield entry
destroys information, therefore enforce boolean interpretation instead.
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1114768
Fixes: 02d04254a5df ("Input: alps - use struct input_mt_pos to track coordinates")
Signed-off-by: Andreas Bosch <linux@progandy.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/mouse/alps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 35a49bf57227..2b0ae8cc8e51 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -835,8 +835,8 @@ static void alps_process_packet_v4(struct psmouse *psmouse) | |||
835 | f->fingers = alps_process_bitmap(priv, f); | 835 | f->fingers = alps_process_bitmap(priv, f); |
836 | } | 836 | } |
837 | 837 | ||
838 | f->left = packet[4] & 0x01; | 838 | f->left = !!(packet[4] & 0x01); |
839 | f->right = packet[4] & 0x02; | 839 | f->right = !!(packet[4] & 0x02); |
840 | 840 | ||
841 | f->st.x = ((packet[1] & 0x7f) << 4) | ((packet[3] & 0x30) >> 2) | | 841 | f->st.x = ((packet[1] & 0x7f) << 4) | ((packet[3] & 0x30) >> 2) | |
842 | ((packet[0] & 0x30) >> 4); | 842 | ((packet[0] & 0x30) >> 4); |