]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: Don't set tool type until we're in range
authorJason Gerecke <jason.gerecke@wacom.com>
Wed, 24 Apr 2019 22:12:57 +0000 (15:12 -0700)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 17 May 2019 14:23:52 +0000 (16:23 +0200)
commit294f2e64b6f38fcc0791e52afcb5416718348523
tree741093a7ccc64d49650e1279c587855f3bbcfc7a
parent4db68816a4857e24ee1a729d5132560832a85969
HID: wacom: Don't set tool type until we're in range

The serial number and tool type information that is reported by the tablet
while a pen is merely "in prox" instead of fully "in range" can be stale
and cause us to report incorrect tool information. Serial number, tool
type, and other information is only valid once the pen comes fully in range
so we should be careful to not use this information until that point.

In particular, this issue may cause the driver to incorectly report
BTN_TOOL_RUBBER after switching from the eraser tool back to the pen.

Fixes: b6a1182ec11b ("HID: wacom: Bluetooth IRQ for Intuos Pro should handle prox/range")
Cc: <stable@vger.kernel.org> # 4.11+
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
drivers/hid/wacom_wac.c