summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2014-09-02 11:54:39 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-09 01:48:01 +0200
commitbc7115b1447fe88d065e7f85078ed776ebe7be74 (patch)
tree89b528de5c741fef964b922f558c2938c675121c
parent2b4f43131da08881423213dace0a514f325fe134 (diff)
PM / sleep: Support freeze as test_suspend option
Added freeze as one of the option for test_suspend boot param. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--kernel/power/suspend_test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/power/suspend_test.c b/kernel/power/suspend_test.c
index bd91bc177c93..379f36de348a 100644
--- a/kernel/power/suspend_test.c
+++ b/kernel/power/suspend_test.c
@@ -100,7 +100,14 @@ static void __init test_wakealarm(struct rtc_device *rtc, suspend_state_t state)
if (state == PM_SUSPEND_STANDBY) {
printk(info_test, pm_states[state]);
status = pm_suspend(state);
+ if (status < 0)
+ state = PM_SUSPEND_FREEZE;
}
+ if (state == PM_SUSPEND_FREEZE) {
+ printk(info_test, pm_states[state]);
+ status = pm_suspend(state);
+ }
+
if (status < 0)
printk(err_suspend, status);