Skip to contentSkip to conversation

HID: wacom: correct misreported EKR ring values

PATCH New Aaron Armstrong Skomra 1 participant 1 message Aug 19, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 HID: wacom: correct misreported EKR ring values

The EKR ring claims a range of 0 to 71 but actually reports values 1 to 72. The ring is used in relative mode so this change should not affect users.

Fixes 72b236d60218f ("HID: wacom: Add support for Express Key Remote.")
Cc <[email protected]> # v4.3+

---
My first attempt at sending this
patch specifically targeted to v4.9.189

neglected the "in-reply-to" in git send-email. My apologies.

 drivers/hid/wacom_wac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/wacom_wac.c +1 -1
index 6c3bf8846b52..949761dd29ca 100644
@@ -819,7 +819,7 @@ static int wacom_remote_irq(struct wacom_wac *wacom_wac, size_t len)
 	input_report_key(input, BTN_BASE2, (data[11] & 0x02));
 
 	if (data[12] & 0x80)
-		input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f));
+		input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f) - 1);
 	else
 		input_report_abs(input, ABS_WHEEL, 0);
 
Signature · 1 line
2.17.1