]> git.ipfire.org Git - people/ms/linux.git/commitdiff
HID: fixup the conflicting keyboard mappings quirk
authorJiri Kosina <jkosina@suse.cz>
Tue, 6 Jan 2015 21:34:19 +0000 (22:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 12:31:33 +0000 (13:31 +0100)
commit 8e7b341037db1835ee6eea64663013cbfcf33575 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-input.c

index a9db3790c7a85172c0f60ab7f7bae188ec9e7bbd..a413f76e84d474a4f2de2e9e9e59b3f226d5bff8 100644 (file)
@@ -1078,6 +1078,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;