diff options
author | Thorsten Leemhuis <fedora@leemhuis.info> | 2017-10-31 08:00:49 +0100 |
---|---|---|
committer | Thorsten Leemhuis <fedora@leemhuis.info> | 2017-10-31 08:00:49 +0100 |
commit | 35fc3bbb7542c6a07234695e03fa26fd5cb0be23 (patch) | |
tree | 18dfe2f98e1d309a9be995d90aa23e203963ea27 /0001-platform-x86-peaq-wmi-Add-DMI-check-before-binding-t.patch | |
parent | 0648a60b7e84124f0357ab6e6d90c894f16f33b1 (diff) | |
parent | 465569abadf808e3a083f3b93ded5103b5bcfab2 (diff) | |
download | kernel-35fc3bbb7542c6a07234695e03fa26fd5cb0be23.tar.gz kernel-35fc3bbb7542c6a07234695e03fa26fd5cb0be23.tar.xz kernel-35fc3bbb7542c6a07234695e03fa26fd5cb0be23.zip |
Merge remote-tracking branch 'origin/master' into rawhide-user-thl-vanilla-fedorakernel-4.14.0-0.rc7.git0.1.vanilla.knurd.1.fc28kernel-4.14.0-0.rc7.git0.1.vanilla.knurd.1.fc27kernel-4.14.0-0.rc7.git0.1.vanilla.knurd.1.fc26kernel-4.14.0-0.rc7.git0.1.vanilla.knurd.1.fc25
Diffstat (limited to '0001-platform-x86-peaq-wmi-Add-DMI-check-before-binding-t.patch')
-rw-r--r-- | 0001-platform-x86-peaq-wmi-Add-DMI-check-before-binding-t.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/0001-platform-x86-peaq-wmi-Add-DMI-check-before-binding-t.patch b/0001-platform-x86-peaq-wmi-Add-DMI-check-before-binding-t.patch new file mode 100644 index 000000000..2242e2d44 --- /dev/null +++ b/0001-platform-x86-peaq-wmi-Add-DMI-check-before-binding-t.patch @@ -0,0 +1,72 @@ +From 0e9df6a74f9573409e5a2fbe29c1389188280bfc Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Thu, 5 Oct 2017 16:02:33 +0200 +Subject: [PATCH] platform/x86: peaq-wmi: Add DMI check before binding to the + WMI interface + +It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not +as unique as a GUID should be and is used on some other devices too. + +This is causing spurious key-press reports on these other devices. + +This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to +ensure that it is actually running on a PEAQ 2-in-1, fixing the +spurious key-presses on these other devices. + +BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1497861 +BugLink: https://bugzilla.suse.com/attachment.cgi?id=743182 +Cc: stable@vger.kernel.org +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/platform/x86/peaq-wmi.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c +index bc98ef95514a..67fa3fa32011 100644 +--- a/drivers/platform/x86/peaq-wmi.c ++++ b/drivers/platform/x86/peaq-wmi.c +@@ -8,6 +8,7 @@ + */ + + #include <linux/acpi.h> ++#include <linux/dmi.h> + #include <linux/input-polldev.h> + #include <linux/kernel.h> + #include <linux/module.h> +@@ -64,8 +65,23 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) + } + } + ++/* Some other devices (Shuttle XS35) use the same WMI GUID for other purposes */ ++static const struct dmi_system_id peaq_dmi_table[] = { ++ { ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "PEAQ"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "PEAQ PMM C1010 MD99187"), ++ }, ++ }, ++ {} ++}; ++ + static int __init peaq_wmi_init(void) + { ++ /* WMI GUID is not unique, also check for a DMI match */ ++ if (!dmi_check_system(peaq_dmi_table)) ++ return -ENODEV; ++ + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) + return -ENODEV; + +@@ -86,6 +101,9 @@ static int __init peaq_wmi_init(void) + + static void __exit peaq_wmi_exit(void) + { ++ if (!dmi_check_system(peaq_dmi_table)) ++ return; ++ + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) + return; + +-- +2.14.2 + |