diff options
-rw-r--r-- | drivers/hid/hid-multitouch.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 58d0e7aaf088..4ee21ac8e856 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -213,6 +213,16 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
213 | struct mt_class *cls = td->mtclass; | 213 | struct mt_class *cls = td->mtclass; |
214 | __s32 quirks = cls->quirks; | 214 | __s32 quirks = cls->quirks; |
215 | 215 | ||
216 | /* Only map fields from TouchScreen or TouchPad collections. | ||
217 | * We need to ignore fields that belong to other collections | ||
218 | * such as Mouse that might have the same GenericDesktop usages. */ | ||
219 | if (field->application == HID_DG_TOUCHSCREEN) | ||
220 | set_bit(INPUT_PROP_DIRECT, hi->input->propbit); | ||
221 | else if (field->application == HID_DG_TOUCHPAD) | ||
222 | set_bit(INPUT_PROP_POINTER, hi->input->propbit); | ||
223 | else | ||
224 | return 0; | ||
225 | |||
216 | switch (usage->hid & HID_USAGE_PAGE) { | 226 | switch (usage->hid & HID_USAGE_PAGE) { |
217 | 227 | ||
218 | case HID_UP_GENDESK: | 228 | case HID_UP_GENDESK: |