HID: core: fix grouping by application
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Tue, 4 Sep 2018 13:31:14 +0000 (15:31 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 4 Sep 2018 19:31:43 +0000 (21:31 +0200)
commit60b45311c9f621f24d52c6942ba13de3a4be3c31
treed15a6125044b26af915fca021375d61c3035086e
parent09a28c09206b82d113359c8c0f252f4d92653292
HID: core: fix grouping by application

commit f630f2cf1541 ("HID: generic: create one input report per
application type") was effectively the same as MULTI_INPUT:
hidinput->report was never set, so hidinput_match_application()
always returned null.

Fix that by testing against the real application.

Note that this breaks some old eGalax touchscreens that expect MULTI_INPUT
instead of HID_QUIRK_INPUT_PER_APP. Enable this quirk for backward
compatibility on all non-Win8 touchscreens.

link: https://bugzilla.kernel.org/show_bug.cgi?id=200847
link: https://bugzilla.kernel.org/show_bug.cgi?id=200849
link: https://bugs.archlinux.org/task/59699
link: https://github.com/NixOS/nixpkgs/issues/45165
Cc: stable@vger.kernel.org # v4.18+
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-input.c
drivers/hid/hid-multitouch.c
include/linux/hid.h