]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: Properly report negative values from Intuos Pro 2 Bluetooth
authorJason Gerecke <killertofu@gmail.com>
Wed, 30 Aug 2017 22:13:25 +0000 (15:13 -0700)
committerJiri Kosina <jkosina@suse.cz>
Wed, 6 Sep 2017 09:01:12 +0000 (11:01 +0200)
commitc6e2e44512b248b459745ce2f4239846d0e5431a
tree10be57bb61338d46f217010060ed5f23ae9958ad
parent99382ea1df679535a9ec5ec62f3bac2a7c7ff70b
HID: wacom: Properly report negative values from Intuos Pro 2 Bluetooth

The wacom driver's IRQ handler for Bluetooth reports from the 2nd-gen
Intuos Pro does not correctly process negative numbers. Values for
tilt and rotation (which can go negative) are instead interpreted as
unsigned and so jump to very large values when the data should be
negative. This commit properly casts the data to ensure we report
negative numbers when necessary.

Fixes: 8f0faea ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface")
Cc: stable@vger.kernel.org # v4.11
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c