HID: wacom: Fix touchring value reporting
authorJason Gerecke <killertofu@gmail.com>
Wed, 16 Dec 2015 21:37:35 +0000 (13:37 -0800)
committerJiri Kosina <jkosina@suse.cz>
Thu, 17 Dec 2015 23:03:07 +0000 (00:03 +0100)
commitaaae03e4f7f0c641a258dde855ab677c9b58b155
tree1fdae5edfc67e64864b11b2a7cf905833fc9b2c5
parent03a0dc546be3fa6091214bd2c05d678d3e8d67df
HID: wacom: Fix touchring value reporting

Commit c7f0522 reports incorrect touchring values to userspace. This is
due to its incorrect handling of the 'touched' bit present in the 'ring1'
and 'ring2' variables. Instead of using this bit when determining if a
value should be sent, the ABS_WHEEL and ABS_INPUT check (different?!)
portions of the position bits. Furthermore, the full values of 'ring1'
and 'ring2' are reported to userspace, despite the 'touched' flag
needing to be trimmed beforehand. This commit addresses both issues.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c