summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/power/disk.c8
-rw-r--r--kernel/power/main.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index d3a158a60312..ae6bbc903b7d 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:
kernel_power_off();
break;
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 873228c71dab..1210961a5aa7 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -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.
OpenPOWER on IntegriCloud