Skip to content

Commit

Permalink
PM / sleep: Support freeze as test_suspend option
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
spandruvada authored and rafaeljw committed Sep 8, 2014
1 parent 2b4f431 commit bc7115b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kernel/power/suspend_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit bc7115b

Please sign in to comment.