summaryrefslogtreecommitdiffstats
path: root/include/linux/suspend.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/suspend.h')
-rw-r--r--include/linux/suspend.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 57a692432f8a..1f7fff47cfac 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -380,12 +380,16 @@ static inline void unlock_system_sleep(void) {}
static inline void lock_system_sleep(void)
{
+ /* simplified freezer_do_not_count() */
+ current->flags |= PF_FREEZER_SKIP;
mutex_lock(&pm_mutex);
}
static inline void unlock_system_sleep(void)
{
mutex_unlock(&pm_mutex);
+ /* simplified freezer_count() */
+ current->flags &= ~PF_FREEZER_SKIP;
}
#endif