Skip to content

Commit

Permalink
Hibernation: Make sure that ACPI is enabled in acpi_hibernation_finish
Browse files Browse the repository at this point in the history
If the BIOS does not enable ACPI and the "acpi=off" command line parameter
is passed to the boot kernel, ACPI may be disabled when the (restored)
image kernel attempts to execute acpi_hibernation_finish().  To prevent
this from happening we can call acpi_enable() from
acpi_hibernation_finish() (if ACPI is already enabled, this will have no
effect).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Rafael J. Wysocki authored and Len Brown committed Oct 10, 2007
1 parent bbf2501 commit 8a0bb73
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/acpi/sleep/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ static int acpi_hibernation_enter(void)

static void acpi_hibernation_finish(void)
{
/*
* If ACPI is not enabled by the BIOS and the boot kernel, we need to
* enable it here.
*/
acpi_enable();
acpi_leave_sleep_state(ACPI_STATE_S4);
acpi_disable_wakeup_device(ACPI_STATE_S4);

Expand Down

0 comments on commit 8a0bb73

Please sign in to comment.