From 1b5d514a3d24996ddbe7c75685af9dfdeff125b5 Mon Sep 17 00:00:00 2001 From: Jason Gerecke Date: Tue, 21 Jul 2015 11:07:24 -0700 Subject: 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 Signed-off-by: Jiri Kosina --- drivers/hid/wacom_wac.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/hid/wacom_wac.h') 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 { int width; int height; int id; + int cc_index; + int cc_value_index; + int num_expected; + int num_received; }; struct wacom_wac { -- cgit v1.2.3-55-g7522