diff options
Diffstat (limited to 'drivers/acpi/button.c')
-rw-r--r-- | drivers/acpi/button.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index c971929d75c2..714e957a871a 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -31,8 +31,7 @@ | |||
31 | #include <linux/seq_file.h> | 31 | #include <linux/seq_file.h> |
32 | #include <linux/input.h> | 32 | #include <linux/input.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <acpi/acpi_bus.h> | 34 | #include <linux/acpi.h> |
35 | #include <acpi/acpi_drivers.h> | ||
36 | #include <acpi/button.h> | 35 | #include <acpi/button.h> |
37 | 36 | ||
38 | #define PREFIX "ACPI: " | 37 | #define PREFIX "ACPI: " |
@@ -81,6 +80,8 @@ static void acpi_button_notify(struct acpi_device *device, u32 event); | |||
81 | 80 | ||
82 | #ifdef CONFIG_PM_SLEEP | 81 | #ifdef CONFIG_PM_SLEEP |
83 | static int acpi_button_resume(struct device *dev); | 82 | static int acpi_button_resume(struct device *dev); |
83 | #else | ||
84 | #define acpi_button_resume NULL | ||
84 | #endif | 85 | #endif |
85 | static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume); | 86 | static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume); |
86 | 87 | ||
@@ -101,7 +102,6 @@ struct acpi_button { | |||
101 | struct input_dev *input; | 102 | struct input_dev *input; |
102 | char phys[32]; /* for input device */ | 103 | char phys[32]; /* for input device */ |
103 | unsigned long pushed; | 104 | unsigned long pushed; |
104 | bool wakeup_enabled; | ||
105 | }; | 105 | }; |
106 | 106 | ||
107 | static BLOCKING_NOTIFIER_HEAD(acpi_lid_notifier); | 107 | static BLOCKING_NOTIFIER_HEAD(acpi_lid_notifier); |
@@ -407,16 +407,6 @@ static int acpi_button_add(struct acpi_device *device) | |||
407 | lid_device = device; | 407 | lid_device = device; |
408 | } | 408 | } |
409 | 409 | ||
410 | if (device->wakeup.flags.valid) { | ||
411 | /* Button's GPE is run-wake GPE */ | ||
412 | acpi_enable_gpe(device->wakeup.gpe_device, | ||
413 | device->wakeup.gpe_number); | ||
414 | if (!device_may_wakeup(&device->dev)) { | ||
415 | device_set_wakeup_enable(&device->dev, true); | ||
416 | button->wakeup_enabled = true; | ||
417 | } | ||
418 | } | ||
419 | |||
420 | printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device)); | 410 | printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device)); |
421 | return 0; | 411 | return 0; |
422 | 412 | ||
@@ -433,13 +423,6 @@ static int acpi_button_remove(struct acpi_device *device) | |||
433 | { | 423 | { |
434 | struct acpi_button *button = acpi_driver_data(device); | 424 | struct acpi_button *button = acpi_driver_data(device); |
435 | 425 | ||
436 | if (device->wakeup.flags.valid) { | ||
437 | acpi_disable_gpe(device->wakeup.gpe_device, | ||
438 | device->wakeup.gpe_number); | ||
439 | if (button->wakeup_enabled) | ||
440 | device_set_wakeup_enable(&device->dev, false); | ||
441 | } | ||
442 | |||
443 | acpi_button_remove_fs(device); | 426 | acpi_button_remove_fs(device); |
444 | input_unregister_device(button->input); | 427 | input_unregister_device(button->input); |
445 | kfree(button); | 428 | kfree(button); |