summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLan Tianyu <tianyu.lan@intel.com>2013-12-12 18:08:17 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-12-19 15:07:00 +0100
commit8eaa29f92a66c92ade1ad663d14d975d776ef492 (patch)
treea93ce49ff4c5300c5a73412f2490ae3f128ea037
parent319e2e3f63c348a9b66db4667efa73178e18b17d (diff)
ACPI / Button: Fix enabling button GPEs twice
Button GPEs have been enabled in the acpi_wake_device_init() during boot and the button driver enables them for the second time. Consequently, it is necessary to do # echo disable > /sys/firmware/acpi/interrupts/gpeXXX twice in a row to disable those GPEs via sysfs. This patch is to remove the GPE enabling code from the button driver to avoid the problem. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> [rjw: Changelog] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/button.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index c971929d75c2..5401e9a98b35 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -101,7 +101,6 @@ struct acpi_button {
struct input_dev *input;
char phys[32]; /* for input device */
unsigned long pushed;
- bool wakeup_enabled;
};
static BLOCKING_NOTIFIER_HEAD(acpi_lid_notifier);
@@ -407,16 +406,6 @@ static int acpi_button_add(struct acpi_device *device)
lid_device = device;
}
- if (device->wakeup.flags.valid) {
- /* Button's GPE is run-wake GPE */
- acpi_enable_gpe(device->wakeup.gpe_device,
- device->wakeup.gpe_number);
- if (!device_may_wakeup(&device->dev)) {
- device_set_wakeup_enable(&device->dev, true);
- button->wakeup_enabled = true;
- }
- }
-
printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device));
return 0;
@@ -433,13 +422,6 @@ static int acpi_button_remove(struct acpi_device *device)
{
struct acpi_button *button = acpi_driver_data(device);
- if (device->wakeup.flags.valid) {
- acpi_disable_gpe(device->wakeup.gpe_device,
- device->wakeup.gpe_number);
- if (button->wakeup_enabled)
- device_set_wakeup_enable(&device->dev, false);
- }
-
acpi_button_remove_fs(device);
input_unregister_device(button->input);
kfree(button);