]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ACPI: S4: Use "platform" rather than "shutdown" mode by default
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 1 Nov 2006 12:23:14 +0000 (13:23 +0100)
committerLen Brown <len.brown@intel.com>
Thu, 2 Nov 2006 03:40:23 +0000 (22:40 -0500)
It has been reported that on some systems the functionality after a resume
from disk is limited if the system is simply powered off during the suspend
instead of using the ACPI S4 suspend (aka platform mode).

Unfortunately the default is currently to power off the system during the
suspend so the users of these systems experience problems after the resume
if they don't switch to the platform mode explicitly.  This patch makes swsusp
use the platform mode by default to avoid such situations.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Stefan Seyfried <seife@suse.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
kernel/power/disk.c
kernel/power/main.c

index d3a158a60312187242c8e1238b68ac5151d11459..ae6bbc903b7d1993577375a7b7e77faf184c33a9 100644 (file)
@@ -44,9 +44,11 @@ static void power_down(suspend_disk_method_t mode)
 
        switch(mode) {
        case PM_DISK_PLATFORM:
-               kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
-               error = pm_ops->enter(PM_SUSPEND_DISK);
-               break;
+               if (pm_ops && pm_ops->enter) {
+                       kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
+                       error = pm_ops->enter(PM_SUSPEND_DISK);
+                       break;
+               }
        case PM_DISK_SHUTDOWN:
                kernel_power_off();
                break;
index 873228c71dabdf700abcf2e6c19dcb3cc96315b7..1210961a5aa7de09561fa06a33b6d7dd5846d3fe 100644 (file)
@@ -27,7 +27,7 @@
 DECLARE_MUTEX(pm_sem);
 
 struct pm_ops *pm_ops;
-suspend_disk_method_t pm_disk_mode = PM_DISK_SHUTDOWN;
+suspend_disk_method_t pm_disk_mode = PM_DISK_PLATFORM;
 
 /**
  *     pm_set_ops - Set the global power method table.