diff options
author | Jason Gerecke <killertofu@gmail.com> | 2015-12-16 13:37:36 -0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-12-18 00:03:07 +0100 |
commit | 0402b6b77a35205072087d7f774e4c2b2797f8c3 (patch) | |
tree | 4bf1977a7ed0cb5602cc106c87a5a47cd21f4b12 /drivers/hid | |
parent | aaae03e4f7f0c641a258dde855ab677c9b58b155 (diff) |
HID: wacom: Fix pad button range for CINTIQ_COMPANION_2
Commit c7f0522 incorrectly constructs the 'buttons' variable for the
CINTIQ_COMPANION_2 case. The high nybble of data[2] is shifted four
bits too far, leaving the bits associated with BTN_7 through BTN_A
unset.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/wacom_wac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 23212af7fa76..f70660465a54 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -516,7 +516,7 @@ static int wacom_intuos_pad(struct wacom_wac *wacom) * d-pad down -> data[4] & 0x80 * d-pad center -> data[3] & 0x01 */ - buttons = ((data[2] & 0xF0) << 7) | + buttons = ((data[2] >> 4) << 7) | ((data[1] & 0x04) << 6) | ((data[2] & 0x0F) << 2) | (data[1] & 0x03); |