aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r--kernel/power/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 3062e940d1fa..053c0a7d7f57 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -30,7 +30,7 @@
30DEFINE_MUTEX(pm_mutex); 30DEFINE_MUTEX(pm_mutex);
31 31
32struct pm_ops *pm_ops; 32struct pm_ops *pm_ops;
33suspend_disk_method_t pm_disk_mode = PM_DISK_PLATFORM; 33suspend_disk_method_t pm_disk_mode = PM_DISK_SHUTDOWN;
34 34
35/** 35/**
36 * pm_set_ops - Set the global power method table. 36 * pm_set_ops - Set the global power method table.
@@ -41,6 +41,10 @@ void pm_set_ops(struct pm_ops * ops)
41{ 41{
42 mutex_lock(&pm_mutex); 42 mutex_lock(&pm_mutex);
43 pm_ops = ops; 43 pm_ops = ops;
44 if (ops && ops->pm_disk_mode != PM_DISK_INVALID) {
45 pm_disk_mode = ops->pm_disk_mode;
46 } else
47 pm_disk_mode = PM_DISK_SHUTDOWN;
44 mutex_unlock(&pm_mutex); 48 mutex_unlock(&pm_mutex);
45} 49}
46 50