diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-06-12 22:51:07 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-06-15 00:55:43 +0200 |
commit | 235d81a630ca2d39818da96f0c14bc960ffbaeb5 (patch) | |
tree | 0ccaabc4511f2d23349b71de4a2773ce872a8e72 /drivers/acpi/sleep.c | |
parent | 190cab84711a3f453e2100d0c9238f42261cf426 (diff) |
ACPI / PM: Clean up device wakeup enable/disable code
The wakeup.flags.enabled flag in struct acpi_device is not used
consistently, as there is no reason why it should only apply
to the enabling/disabling of the wakeup GPE, so put the invocation
of acpi_enable_wakeup_device_power() under it too.
Moreover, it is not necessary to call
acpi_enable_wakeup_devices() and acpi_disable_wakeup_devices() for
suspend-to-idle, so don't do that.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r-- | drivers/acpi/sleep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 097d630ab886..a4782c75ebdd 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -658,19 +658,19 @@ static int acpi_freeze_begin(void) static int acpi_freeze_prepare(void) { - acpi_enable_wakeup_devices(ACPI_STATE_S0); acpi_enable_all_wakeup_gpes(); acpi_os_wait_events_complete(); if (acpi_sci_irq_valid()) enable_irq_wake(acpi_sci_irq); + return 0; } static void acpi_freeze_restore(void) { - acpi_disable_wakeup_devices(ACPI_STATE_S0); if (acpi_sci_irq_valid()) disable_irq_wake(acpi_sci_irq); + acpi_enable_all_runtime_gpes(); } |