[PATCH] hp-wmi; Limit hotkey enable funtion

From: Kyle Evans
Date: Wed Aug 14 2013 - 10:18:34 EST


This patch is a supplement to commit
b253c9d1d858a3f115f791ee4fe2b9399ae7dbbd

Signed-off-by: Kyle Evans <kvans32@xxxxxxxxx>
---
drivers/platform/x86/hp-wmi.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 97bb05e..b65014f 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -35,6 +35,7 @@
#include <linux/input/sparse-keymap.h>
#include <linux/platform_device.h>
#include <linux/acpi.h>
+#include <linux/dmi.h>
#include <linux/rfkill.h>
#include <linux/string.h>

@@ -996,6 +997,17 @@ static struct platform_driver hp_wmi_driver = {
.remove = __exit_p(hp_wmi_bios_remove),
};

+static struct dmi_system_id __initdata tx2_dmi_table[] = {
+ {
+ .ident = "tx2",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "tx2"),
+ },
+ },
+ { }
+};
+
static int __init hp_wmi_init(void)
{
int err;
@@ -1010,7 +1022,9 @@ static int __init hp_wmi_init(void)
if (err)
return err;

- hp_wmi_enable_hotkeys();
+ if (dmi_check_system(tx2_dmi_table)) {
+ hp_wmi_enable_hotkeys();
+ {
}

if (bios_capable) {
--
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/