]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: Ignore contacts in excess of declared contact count
authorJason Gerecke <killertofu@gmail.com>
Tue, 21 Jul 2015 18:07:24 +0000 (11:07 -0700)
committerJiri Kosina <jkosina@suse.com>
Thu, 23 Jul 2015 12:02:44 +0000 (14:02 +0200)
commit9e40f21f85a1803eb948c852c7b2647304cf1089
tree65d61caa2b70ca02e261cbb665f715f20507e67b
parent3a09671738a7790c88ea7da321214e3dcda43385
HID: wacom: Ignore contacts in excess of declared contact count

The reports sent from some touch devices (e.g. the Cintiq 24HDT) contain
junk data in the contact slots which follow the final "valid" contact.
To avoid forwarding it to usrspace, we store the reported contact count
during the pre-process phase and then only process that many contacts.
If a device sends its contacts across multiple reports (what Microsoft
refers to as "hybrid" mode) then the contact count will be zero for
reports other than the first.

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