UPSTREAM: HID: fixup the conflicting keyboard mappings quirk

The ignore check that got added in 6ce901eb61 ("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.

Cc: <stable@vger.kernel.org>
Fixes: 6ce901eb61 ("HID: input: fix confusion on conflicting mappings")
Reported-by: Fredrik Hallenberg <megahallon@gmail.com>
Reported-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit 8e7b341037)
Signed-off-by: Adam Goode <agoode@chromium.org>

BUG=chromium:476215
TEST=Test that backslash "\" key repeats in N-key rollover mode

Change-Id: I77d9bfaa95beed72ab797d18e98bb0e61a700239
Reviewed-on: https://chromium-review.googlesource.com/291141
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Adam Goode <agoode@chromium.org>
Tested-by: Adam Goode <agoode@chromium.org>
This commit is contained in:
Jiri Kosina
2015-01-06 22:34:19 +01:00
committed by ChromeOS Commit Bot
parent 409be6946f
commit c45d0f2ee4

View File

@@ -1115,6 +1115,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;