diff options
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r-- | drivers/acpi/sleep.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index a6574d626340..097d630ab886 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -663,40 +663,14 @@ static int acpi_freeze_prepare(void) | |||
663 | acpi_os_wait_events_complete(); | 663 | acpi_os_wait_events_complete(); |
664 | if (acpi_sci_irq_valid()) | 664 | if (acpi_sci_irq_valid()) |
665 | enable_irq_wake(acpi_sci_irq); | 665 | enable_irq_wake(acpi_sci_irq); |
666 | |||
667 | return 0; | 666 | return 0; |
668 | } | 667 | } |
669 | 668 | ||
670 | static void acpi_freeze_wake(void) | ||
671 | { | ||
672 | /* | ||
673 | * If IRQD_WAKEUP_ARMED is not set for the SCI at this point, it means | ||
674 | * that the SCI has triggered while suspended, so cancel the wakeup in | ||
675 | * case it has not been a wakeup event (the GPEs will be checked later). | ||
676 | */ | ||
677 | if (acpi_sci_irq_valid() && | ||
678 | !irqd_is_wakeup_armed(irq_get_irq_data(acpi_sci_irq))) | ||
679 | pm_system_cancel_wakeup(); | ||
680 | } | ||
681 | |||
682 | static void acpi_freeze_sync(void) | ||
683 | { | ||
684 | /* | ||
685 | * Process all pending events in case there are any wakeup ones. | ||
686 | * | ||
687 | * The EC driver uses the system workqueue, so that one needs to be | ||
688 | * flushed too. | ||
689 | */ | ||
690 | acpi_os_wait_events_complete(); | ||
691 | flush_scheduled_work(); | ||
692 | } | ||
693 | |||
694 | static void acpi_freeze_restore(void) | 669 | static void acpi_freeze_restore(void) |
695 | { | 670 | { |
696 | acpi_disable_wakeup_devices(ACPI_STATE_S0); | 671 | acpi_disable_wakeup_devices(ACPI_STATE_S0); |
697 | if (acpi_sci_irq_valid()) | 672 | if (acpi_sci_irq_valid()) |
698 | disable_irq_wake(acpi_sci_irq); | 673 | disable_irq_wake(acpi_sci_irq); |
699 | |||
700 | acpi_enable_all_runtime_gpes(); | 674 | acpi_enable_all_runtime_gpes(); |
701 | } | 675 | } |
702 | 676 | ||
@@ -708,8 +682,6 @@ static void acpi_freeze_end(void) | |||
708 | static const struct platform_freeze_ops acpi_freeze_ops = { | 682 | static const struct platform_freeze_ops acpi_freeze_ops = { |
709 | .begin = acpi_freeze_begin, | 683 | .begin = acpi_freeze_begin, |
710 | .prepare = acpi_freeze_prepare, | 684 | .prepare = acpi_freeze_prepare, |
711 | .wake = acpi_freeze_wake, | ||
712 | .sync = acpi_freeze_sync, | ||
713 | .restore = acpi_freeze_restore, | 685 | .restore = acpi_freeze_restore, |
714 | .end = acpi_freeze_end, | 686 | .end = acpi_freeze_end, |
715 | }; | 687 | }; |