summaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/autosleep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/power/autosleep.c b/kernel/power/autosleep.c
index 42348e3589d3..ca304046d9e2 100644
--- a/kernel/power/autosleep.c
+++ b/kernel/power/autosleep.c
@@ -101,8 +101,12 @@ int pm_autosleep_set_state(suspend_state_t state)
__pm_relax(autosleep_ws);
- if (state > PM_SUSPEND_ON)
+ if (state > PM_SUSPEND_ON) {
+ pm_wakep_autosleep_enabled(true);
queue_up_suspend_work();
+ } else {
+ pm_wakep_autosleep_enabled(false);
+ }
mutex_unlock(&autosleep_lock);
return 0;