]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commitb63c4c2718d641ba9bec888994f0cb0c23a1ef45
tree10be57bb61338d46f217010060ed5f23ae9958ad
parente57f4e67a0c73ca1c3afb68928b917906bd82eaf
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: 4922cd2 ("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