summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-multitouch.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-08-17 11:41:59 +0300
committerIngo Molnar <mingo@kernel.org>2015-08-17 11:41:59 +0300
commit5461bd81bf7f86503f393b0b1d57e69b1f1bd44e (patch)
tree25ec4a2f43019c4d7cc76eb6a967ec450add9401 /drivers/hid/hid-multitouch.c
parent949163015ce6fdb76a5e846a3582d3c40c23c001 (diff)
parent2c6625cd545bdd66acff14f3394865d43920a5c7 (diff)
downloadlinux-5461bd81bf7f86503f393b0b1d57e69b1f1bd44e.tar.xz
Merge tag 'v4.2-rc7' into x86/boot, to refresh the branch before merging new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/hid/hid-multitouch.c')
-rw-r--r--drivers/hid/hid-multitouch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 6a9b05b328a9..7c811252c1ce 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -778,9 +778,16 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
/*
* some egalax touchscreens have "application == HID_DG_TOUCHSCREEN"
* for the stylus.
+ * The check for mt_report_id ensures we don't process
+ * HID_DG_CONTACTCOUNT from the pen report as it is outside the physical
+ * collection, but within the report ID.
*/
if (field->physical == HID_DG_STYLUS)
return 0;
+ else if ((field->physical == 0) &&
+ (field->report->id != td->mt_report_id) &&
+ (td->mt_report_id != -1))
+ return 0;
if (field->application == HID_DG_TOUCHSCREEN ||
field->application == HID_DG_TOUCHPAD)