]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.19.2/hid-fixup-the-conflicting-keyboard-mappings-quirk.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.19.2 / hid-fixup-the-conflicting-keyboard-mappings-quirk.patch
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
5
6 From: Jiri Kosina <jkosina@suse.cz>
7
8 commit 8e7b341037db1835ee6eea64663013cbfcf33575 upstream.
9
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
13 might break.
14
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>
20
21 ---
22 drivers/hid/hid-input.c | 1 +
23 1 file changed, 1 insertion(+)
24
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
28 */
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])
34 return;