Commit 36530280 authored by Jiri Kosina's avatar Jiri Kosina Committed by Jiri Slaby

HID: fixup the conflicting keyboard mappings quirk

commit 8e7b3410 upstream.

The ignore check that got added in 6ce901eb ("HID: input: fix confusion
on conflicting mappings") needs to properly check for VARIABLE reports
as well (ARRAY reports should be ignored), otherwise legitimate keyboards
might break.

Fixes: 6ce901eb ("HID: input: fix confusion on conflicting mappings")
Reported-by: default avatarFredrik Hallenberg <megahallon@gmail.com>
Reported-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 955c3838
......@@ -1081,6 +1081,7 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
*/
if (!(field->flags & (HID_MAIN_ITEM_RELATIVE |
HID_MAIN_ITEM_BUFFERED_BYTE)) &&
(field->flags & HID_MAIN_ITEM_VARIABLE) &&
usage->usage_index < field->maxusage &&
value == field->value[usage->usage_index])
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment