aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r--kernel/power/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index d9706da10930..35b50823d83b 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -15,17 +15,16 @@
15#include <linux/workqueue.h> 15#include <linux/workqueue.h>
16#include <linux/debugfs.h> 16#include <linux/debugfs.h>
17#include <linux/seq_file.h> 17#include <linux/seq_file.h>
18#include <linux/suspend.h>
18 19
19#include "power.h" 20#include "power.h"
20 21
21DEFINE_MUTEX(pm_mutex);
22
23#ifdef CONFIG_PM_SLEEP 22#ifdef CONFIG_PM_SLEEP
24 23
25void lock_system_sleep(void) 24void lock_system_sleep(void)
26{ 25{
27 current->flags |= PF_FREEZER_SKIP; 26 current->flags |= PF_FREEZER_SKIP;
28 mutex_lock(&pm_mutex); 27 mutex_lock(&system_transition_mutex);
29} 28}
30EXPORT_SYMBOL_GPL(lock_system_sleep); 29EXPORT_SYMBOL_GPL(lock_system_sleep);
31 30
@@ -37,8 +36,9 @@ void unlock_system_sleep(void)
37 * 36 *
38 * Reason: 37 * Reason:
39 * Fundamentally, we just don't need it, because freezing condition 38 * Fundamentally, we just don't need it, because freezing condition
40 * doesn't come into effect until we release the pm_mutex lock, 39 * doesn't come into effect until we release the
41 * since the freezer always works with pm_mutex held. 40 * system_transition_mutex lock, since the freezer always works with
41 * system_transition_mutex held.
42 * 42 *
43 * More importantly, in the case of hibernation, 43 * More importantly, in the case of hibernation,
44 * unlock_system_sleep() gets called in snapshot_read() and 44 * unlock_system_sleep() gets called in snapshot_read() and
@@ -47,7 +47,7 @@ void unlock_system_sleep(void)
47 * enter the refrigerator, thus causing hibernation to lockup. 47 * enter the refrigerator, thus causing hibernation to lockup.
48 */ 48 */
49 current->flags &= ~PF_FREEZER_SKIP; 49 current->flags &= ~PF_FREEZER_SKIP;
50 mutex_unlock(&pm_mutex); 50 mutex_unlock(&system_transition_mutex);
51} 51}
52EXPORT_SYMBOL_GPL(unlock_system_sleep); 52EXPORT_SYMBOL_GPL(unlock_system_sleep);
53 53