diff options
Diffstat (limited to 'drivers/acpi/button.c')
-rw-r--r-- | drivers/acpi/button.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index aac81f40e28e..e1eee7a60fad 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/input.h> | 30 | #include <linux/input.h> |
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/acpi.h> | 32 | #include <linux/acpi.h> |
33 | #include <linux/dmi.h> | ||
33 | #include <acpi/button.h> | 34 | #include <acpi/button.h> |
34 | 35 | ||
35 | #define PREFIX "ACPI: " | 36 | #define PREFIX "ACPI: " |
@@ -76,6 +77,22 @@ static const struct acpi_device_id button_device_ids[] = { | |||
76 | }; | 77 | }; |
77 | MODULE_DEVICE_TABLE(acpi, button_device_ids); | 78 | MODULE_DEVICE_TABLE(acpi, button_device_ids); |
78 | 79 | ||
80 | /* | ||
81 | * Some devices which don't even have a lid in anyway have a broken _LID | ||
82 | * method (e.g. pointing to a floating gpio pin) causing spurious LID events. | ||
83 | */ | ||
84 | static const struct dmi_system_id lid_blacklst[] = { | ||
85 | { | ||
86 | /* GP-electronic T701 */ | ||
87 | .matches = { | ||
88 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), | ||
89 | DMI_MATCH(DMI_PRODUCT_NAME, "T701"), | ||
90 | DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"), | ||
91 | }, | ||
92 | }, | ||
93 | {} | ||
94 | }; | ||
95 | |||
79 | static int acpi_button_add(struct acpi_device *device); | 96 | static int acpi_button_add(struct acpi_device *device); |
80 | static int acpi_button_remove(struct acpi_device *device); | 97 | static int acpi_button_remove(struct acpi_device *device); |
81 | static void acpi_button_notify(struct acpi_device *device, u32 event); | 98 | static void acpi_button_notify(struct acpi_device *device, u32 event); |
@@ -475,6 +492,9 @@ static int acpi_button_add(struct acpi_device *device) | |||
475 | char *name, *class; | 492 | char *name, *class; |
476 | int error; | 493 | int error; |
477 | 494 | ||
495 | if (!strcmp(hid, ACPI_BUTTON_HID_LID) && dmi_check_system(lid_blacklst)) | ||
496 | return -ENODEV; | ||
497 | |||
478 | button = kzalloc(sizeof(struct acpi_button), GFP_KERNEL); | 498 | button = kzalloc(sizeof(struct acpi_button), GFP_KERNEL); |
479 | if (!button) | 499 | if (!button) |
480 | return -ENOMEM; | 500 | return -ENOMEM; |