diff options
-rw-r--r-- | kernel/power/suspend_test.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/power/suspend_test.c b/kernel/power/suspend_test.c index bd91bc1..379f36d 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); |