Commit:     9185cfa92507d07ac787bc73d06c42222eec7239
Parent:     8b0dc866dd9b8d10a53cb3537385a51b7ee54b62
Author:     Rafael J. Wysocki <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 1 13:23:14 2006 +0100
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Wed Nov 1 22:40:23 2006 -0500

    ACPI: S4: Use "platform" rather than "shutdown" mode by default
    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 
    use the platform mode by default to avoid such situations.
    Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
    Acked-by: Stefan Seyfried <[EMAIL PROTECTED]>
    Acked-by: Pavel Machek <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
 kernel/power/disk.c |    8 +++++---
 kernel/power/main.c |    2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index d3a158a..ae6bbc9 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -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:
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 873228c..1210961 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -27,7 +27,7 @@
 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. 
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to