aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sleep
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-10-02 16:24:08 -0400
committerLen Brown <len.brown@intel.com>2007-10-10 00:23:09 -0400
commit8a0bb7362587807fec985f72fb0317aa8ed24835 (patch)
treea7ca52aeb218b5207349d93ffcf1fec49356bdb9 /drivers/acpi/sleep
parentbbf25010f1a6b761914430f5fca081ec8c7accd1 (diff)
Hibernation: Make sure that ACPI is enabled in acpi_hibernation_finish
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>
Diffstat (limited to 'drivers/acpi/sleep')
-rw-r--r--drivers/acpi/sleep/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 2cbb9aabd00e..caf8721ae6fb 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -256,6 +256,11 @@ static int acpi_hibernation_enter(void)
256 256
257static void acpi_hibernation_finish(void) 257static void acpi_hibernation_finish(void)
258{ 258{
259 /*
260 * If ACPI is not enabled by the BIOS and the boot kernel, we need to
261 * enable it here.
262 */
263 acpi_enable();
259 acpi_leave_sleep_state(ACPI_STATE_S4); 264 acpi_leave_sleep_state(ACPI_STATE_S4);
260 acpi_disable_wakeup_device(ACPI_STATE_S4); 265 acpi_disable_wakeup_device(ACPI_STATE_S4);
261 266