From 107de747c7044736738916ff1442dd7f275955d2 Mon Sep 17 00:00:00 2001 From: "Wael M. Nasreddine" Date: Tue, 4 Sep 2018 13:29:40 -0700 Subject: [PATCH] linux_4_18: HID: core: fix grouping by application This patch fixes #45165 commit f07b3c1da92d ("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 --- pkgs/top-level/all-packages.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c8ff605bbd0..2425dcf5b28 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14016,6 +14016,18 @@ with pkgs; # when adding a new linux version # kernelPatches.cpu-cgroup-v2."4.11" kernelPatches.modinst_arg_list_too_long + + # https://github.com/NixOS/nixpkgs/issues/45165 + # TODO: remove this patch once it is merged upstream and released. + (rec { + name = "hid-core-fix-grouping-by-application"; + patch = fetchpatch { + name = name + ".patch"; + # https://patchwork.kernel.org/patch/10587369/ + url = https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git/patch/?id=0d6c3011409135ea84e2a231b013a22017ff999a; + sha256 = "0bdrv0aqjh0rdjlaaaqpdgrnd9452fa4ggaa1nq2kmik3q00cq4m"; + }; + }) ]; };