Skip to contentSkip to conversation

HID: wacom: bits shifted too much for 9th and 10th buttons

PATCH Applied Ping Cheng 2 participants 2 messages Aug 31, 2017 – Sep 6, 2017

Subsystems (2)
lore
Share & tools
lore

Ping Cheng

author
#0 lore raw

PATCH 1/1 HID: wacom: bits shifted too much for 9th and 10th buttons

Cintiq 12 has 10 expresskey buttons. The bit shift for the last two buttons were off by 5.

Fixes c7f0522 ("HID: wacom: Slim down wacom_intuos_pad processing")
---
 drivers/hid/wacom_wac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hid/wacom_wac.c +2 -2
index 9f94029..801889c 100644
@@ -567,8 +567,8 @@ static int wacom_intuos_pad(struct wacom_wac *wacom)
 				keys = data[9] & 0x07;
 			}
 		} else {
-			buttons = ((data[6] & 0x10) << 10) |
-			          ((data[5] & 0x10) << 9)  |
+			buttons = ((data[6] & 0x10) << 5)  |
+			          ((data[5] & 0x10) << 4)  |
 			          ((data[6] & 0x0F) << 4)  |
 			          (data[5] & 0x0F);
 		}
Signature · 1 line
2.7.4