Skip to content

Commit 0402b6b

Browse files
jigpuJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent aaae03e commit 0402b6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/wacom_wac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ static int wacom_intuos_pad(struct wacom_wac *wacom)
516516
* d-pad down -> data[4] & 0x80
517517
* d-pad center -> data[3] & 0x01
518518
*/
519-
buttons = ((data[2] & 0xF0) << 7) |
519+
buttons = ((data[2] >> 4) << 7) |
520520
((data[1] & 0x04) << 6) |
521521
((data[2] & 0x0F) << 2) |
522522
(data[1] & 0x03);

0 commit comments

Comments
 (0)