]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: Read and internally use corrected Intuos tool IDs
authorJason Gerecke <killertofu@gmail.com>
Thu, 20 Oct 2016 01:03:47 +0000 (18:03 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 20 Oct 2016 07:53:58 +0000 (09:53 +0200)
commit5360aa9891c6a223a83d59f88b13393c596ea144
tree3e37c57b7a8eedf15c7d292eb577693b073bbc96
parent6116f98e3892de7c431318bc82227322ed9dd135
HID: wacom: Read and internally use corrected Intuos tool IDs

The 'wacom_intuos_inout' function incorrectly assmebles tool IDs from the
proximity report, shifting the higher values of the ID four bits farther
than intended. This problem was not detected until too late, but has not
caused any issues since the incorrect IDs still fit in a 32-bit integer
and userspace programs have not required the value to match the hardware
(just that the values are unique and constant).

The tool IDs reported by the new MobileStudio Pro (or any future
HID_GENERIC device that supports them) do not suffer from the same
assembly issue, however. In order for 'wacom_intuos_get_tool_type' to
work for with both codepaths, we correct this issue internally and
have 'wacom_intuos_general' only mangle the ID when it is posted to
userspace.

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