mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
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>
This commit is contained in:
parent
aaae03e4f7
commit
0402b6b77a
1 changed files with 1 additions and 1 deletions
|
@ -516,7 +516,7 @@ static int wacom_intuos_pad(struct wacom_wac *wacom)
|
||||||
* d-pad down -> data[4] & 0x80
|
* d-pad down -> data[4] & 0x80
|
||||||
* d-pad center -> data[3] & 0x01
|
* d-pad center -> data[3] & 0x01
|
||||||
*/
|
*/
|
||||||
buttons = ((data[2] & 0xF0) << 7) |
|
buttons = ((data[2] >> 4) << 7) |
|
||||||
((data[1] & 0x04) << 6) |
|
((data[1] & 0x04) << 6) |
|
||||||
((data[2] & 0x0F) << 2) |
|
((data[2] & 0x0F) << 2) |
|
||||||
(data[1] & 0x03);
|
(data[1] & 0x03);
|
||||||
|
|
Loading…
Reference in a new issue