aboutsummaryrefslogtreecommitdiff
path: root/kernel/power/autosleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/autosleep.c')
-rw-r--r--kernel/power/autosleep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/power/autosleep.c b/kernel/power/autosleep.c
index c6422ffeda9..9012ecf7b81 100644
--- a/kernel/power/autosleep.c
+++ b/kernel/power/autosleep.c
@@ -32,7 +32,8 @@ static void try_to_suspend(struct work_struct *work)
mutex_lock(&autosleep_lock);
- if (!pm_save_wakeup_count(initial_count)) {
+ if (!pm_save_wakeup_count(initial_count) ||
+ system_state != SYSTEM_RUNNING) {
mutex_unlock(&autosleep_lock);
goto out;
}