diff options
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r-- | kernel/power/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c index 6a6d5eb3524e..d023b6b584e5 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -228,6 +228,7 @@ static int suspend_enter(suspend_state_t state) | |||
228 | { | 228 | { |
229 | int error = 0; | 229 | int error = 0; |
230 | 230 | ||
231 | device_pm_lock(); | ||
231 | arch_suspend_disable_irqs(); | 232 | arch_suspend_disable_irqs(); |
232 | BUG_ON(!irqs_disabled()); | 233 | BUG_ON(!irqs_disabled()); |
233 | 234 | ||
@@ -239,10 +240,11 @@ static int suspend_enter(suspend_state_t state) | |||
239 | if (!suspend_test(TEST_CORE)) | 240 | if (!suspend_test(TEST_CORE)) |
240 | error = suspend_ops->enter(state); | 241 | error = suspend_ops->enter(state); |
241 | 242 | ||
242 | device_power_up(); | 243 | device_power_up(PMSG_RESUME); |
243 | Done: | 244 | Done: |
244 | arch_suspend_enable_irqs(); | 245 | arch_suspend_enable_irqs(); |
245 | BUG_ON(irqs_disabled()); | 246 | BUG_ON(irqs_disabled()); |
247 | device_pm_unlock(); | ||
246 | return error; | 248 | return error; |
247 | } | 249 | } |
248 | 250 | ||
@@ -291,7 +293,7 @@ int suspend_devices_and_enter(suspend_state_t state) | |||
291 | if (suspend_ops->finish) | 293 | if (suspend_ops->finish) |
292 | suspend_ops->finish(); | 294 | suspend_ops->finish(); |
293 | Resume_devices: | 295 | Resume_devices: |
294 | device_resume(); | 296 | device_resume(PMSG_RESUME); |
295 | Resume_console: | 297 | Resume_console: |
296 | resume_console(); | 298 | resume_console(); |
297 | Close: | 299 | Close: |