Commit c4e3aa81 authored by Patrick Mochel's avatar Patrick Mochel

[power] Make sure ACPI prepares a console during S3.

Orginally from Pavel Machek.
parent 2e4208cd
...@@ -226,13 +226,15 @@ acpi_suspend ( ...@@ -226,13 +226,15 @@ acpi_suspend (
if (state == ACPI_STATE_S4 && !acpi_gbl_FACS->S4bios_f) if (state == ACPI_STATE_S4 && !acpi_gbl_FACS->S4bios_f)
return AE_ERROR; return AE_ERROR;
pm_prepare_console();
/* /*
* TBD: S1 can be done without device_suspend. Make a CONFIG_XX * TBD: S1 can be done without device_suspend. Make a CONFIG_XX
* to handle however when S1 failed without device_suspend. * to handle however when S1 failed without device_suspend.
*/ */
if (freeze_processes()) { if (freeze_processes()) {
thaw_processes(); status = AE_ERROR;
return AE_ERROR; /* device_suspend needs processes to be stopped */ goto Done;
} }
/* do we have a wakeup address for S2 and S3? */ /* do we have a wakeup address for S2 and S3? */
...@@ -269,8 +271,10 @@ acpi_suspend ( ...@@ -269,8 +271,10 @@ acpi_suspend (
/* reset firmware waking vector */ /* reset firmware waking vector */
acpi_set_firmware_waking_vector((acpi_physical_address) 0); acpi_set_firmware_waking_vector((acpi_physical_address) 0);
thaw_processes();
Done:
thaw_processes();
pm_restore_console();
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment