aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/resume.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/power/resume.c')
-rw-r--r--drivers/base/power/resume.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/base/power/resume.c b/drivers/base/power/resume.c
index a2c64188d713..f6cfea496ea0 100644
--- a/drivers/base/power/resume.c
+++ b/drivers/base/power/resume.c
@@ -80,7 +80,7 @@ static int resume_device_early(struct device * dev)
80 */ 80 */
81void dpm_resume(void) 81void dpm_resume(void)
82{ 82{
83 down(&dpm_list_sem); 83 mutex_lock(&dpm_list_mtx);
84 while(!list_empty(&dpm_off)) { 84 while(!list_empty(&dpm_off)) {
85 struct list_head * entry = dpm_off.next; 85 struct list_head * entry = dpm_off.next;
86 struct device * dev = to_device(entry); 86 struct device * dev = to_device(entry);
@@ -88,13 +88,13 @@ void dpm_resume(void)
88 get_device(dev); 88 get_device(dev);
89 list_move_tail(entry, &dpm_active); 89 list_move_tail(entry, &dpm_active);
90 90
91 up(&dpm_list_sem); 91 mutex_unlock(&dpm_list_mtx);
92 if (!dev->power.prev_state.event) 92 if (!dev->power.prev_state.event)
93 resume_device(dev); 93 resume_device(dev);
94 down(&dpm_list_sem); 94 mutex_lock(&dpm_list_mtx);
95 put_device(dev); 95 put_device(dev);
96 } 96 }
97 up(&dpm_list_sem); 97 mutex_unlock(&dpm_list_mtx);
98} 98}
99 99
100 100
@@ -108,9 +108,9 @@ void dpm_resume(void)
108void device_resume(void) 108void device_resume(void)
109{ 109{
110 might_sleep(); 110 might_sleep();
111 down(&dpm_sem); 111 mutex_lock(&dpm_mtx);
112 dpm_resume(); 112 dpm_resume();
113 up(&dpm_sem); 113 mutex_unlock(&dpm_mtx);
114} 114}
115 115
116EXPORT_SYMBOL_GPL(device_resume); 116EXPORT_SYMBOL_GPL(device_resume);