Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0402b6b7 authored by Jason Gerecke's avatar Jason Gerecke Committed by Jiri Kosina
Browse files

HID: wacom: Fix pad button range for CINTIQ_COMPANION_2



Commit c7f0522a 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: default avatarJason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent aaae03e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);