diff options
Diffstat (limited to 'kernel/power/swsusp.c')
-rw-r--r-- | kernel/power/swsusp.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index 605c536795ba..dc29a20aff41 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c | |||
@@ -261,38 +261,3 @@ int swsusp_shrink_memory(void) | |||
261 | 261 | ||
262 | return 0; | 262 | return 0; |
263 | } | 263 | } |
264 | |||
265 | int swsusp_resume(void) | ||
266 | { | ||
267 | int error; | ||
268 | |||
269 | local_irq_disable(); | ||
270 | /* NOTE: device_power_down() is just a suspend() with irqs off; | ||
271 | * it has no special "power things down" semantics | ||
272 | */ | ||
273 | if (device_power_down(PMSG_PRETHAW)) | ||
274 | printk(KERN_ERR "Some devices failed to power down, very bad\n"); | ||
275 | /* We'll ignore saved state, but this gets preempt count (etc) right */ | ||
276 | save_processor_state(); | ||
277 | error = restore_highmem(); | ||
278 | if (!error) { | ||
279 | error = swsusp_arch_resume(); | ||
280 | /* The code below is only ever reached in case of a failure. | ||
281 | * Otherwise execution continues at place where | ||
282 | * swsusp_arch_suspend() was called | ||
283 | */ | ||
284 | BUG_ON(!error); | ||
285 | /* This call to restore_highmem() undos the previous one */ | ||
286 | restore_highmem(); | ||
287 | } | ||
288 | /* The only reason why swsusp_arch_resume() can fail is memory being | ||
289 | * very tight, so we have to free it as soon as we can to avoid | ||
290 | * subsequent failures | ||
291 | */ | ||
292 | swsusp_free(); | ||
293 | restore_processor_state(); | ||
294 | touch_softlockup_watchdog(); | ||
295 | device_power_up(); | ||
296 | local_irq_enable(); | ||
297 | return error; | ||
298 | } | ||