diff options
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r-- | kernel/power/disk.c | 8 |
1 files changed, 5 insertions, 3 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) | |||
44 | 44 | ||
45 | switch(mode) { | 45 | switch(mode) { |
46 | case PM_DISK_PLATFORM: | 46 | case PM_DISK_PLATFORM: |
47 | kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); | 47 | if (pm_ops && pm_ops->enter) { |
48 | error = pm_ops->enter(PM_SUSPEND_DISK); | 48 | kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); |
49 | break; | 49 | error = pm_ops->enter(PM_SUSPEND_DISK); |
50 | break; | ||
51 | } | ||
50 | case PM_DISK_SHUTDOWN: | 52 | case PM_DISK_SHUTDOWN: |
51 | kernel_power_off(); | 53 | kernel_power_off(); |
52 | break; | 54 | break; |