aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/wacom_wac.h
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2015-07-21 14:07:24 -0400
committerJiri Kosina <jkosina@suse.com>2015-07-23 08:02:44 -0400
commit1b5d514a3d24996ddbe7c75685af9dfdeff125b5 (patch)
tree65d61caa2b70ca02e261cbb665f715f20507e67b /drivers/hid/wacom_wac.h
parent06324e0cb28e06cd7cf609d7c3099b12841a5dd6 (diff)
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>
Diffstat (limited to 'drivers/hid/wacom_wac.h')
-rw-r--r--drivers/hid/wacom_wac.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
index 2978c303909d..c245a6628224 100644
--- a/drivers/hid/wacom_wac.h
+++ b/drivers/hid/wacom_wac.h
@@ -193,6 +193,10 @@ struct hid_data {
193 int width; 193 int width;
194 int height; 194 int height;
195 int id; 195 int id;
196 int cc_index;
197 int cc_value_index;
198 int num_expected;
199 int num_received;
196}; 200};
197 201
198struct wacom_wac { 202struct wacom_wac {