1 From 8e7b341037db1835ee6eea64663013cbfcf33575 Mon Sep 17 00:00:00 2001
2 From: Jiri Kosina <jkosina@suse.cz>
3 Date: Tue, 6 Jan 2015 22:34:19 +0100
4 Subject: HID: fixup the conflicting keyboard mappings quirk
6 From: Jiri Kosina <jkosina@suse.cz>
8 commit 8e7b341037db1835ee6eea64663013cbfcf33575 upstream.
10 The ignore check that got added in 6ce901eb61 ("HID: input: fix confusion
11 on conflicting mappings") needs to properly check for VARIABLE reports
12 as well (ARRAY reports should be ignored), otherwise legitimate keyboards
15 Fixes: 6ce901eb61 ("HID: input: fix confusion on conflicting mappings")
16 Reported-by: Fredrik Hallenberg <megahallon@gmail.com>
17 Reported-by: David Herrmann <dh.herrmann@gmail.com>
18 Signed-off-by: Jiri Kosina <jkosina@suse.cz>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 drivers/hid/hid-input.c | 1 +
23 1 file changed, 1 insertion(+)
25 --- a/drivers/hid/hid-input.c
26 +++ b/drivers/hid/hid-input.c
27 @@ -1116,6 +1116,7 @@ void hidinput_hid_event(struct hid_devic
29 if (!(field->flags & (HID_MAIN_ITEM_RELATIVE |
30 HID_MAIN_ITEM_BUFFERED_BYTE)) &&
31 + (field->flags & HID_MAIN_ITEM_VARIABLE) &&
32 usage->usage_index < field->maxusage &&
33 value == field->value[usage->usage_index])