Commit 72a4a179 authored by Patrick Mochel's avatar Patrick Mochel

[power] Further swsusp cleanups.

- Remove drivers_resume() and call from do_magic_resume2(). Handled by core.
- When bringing devices back to life, call device_pm_resume()
- Make sure we report the error from write_suspend_image()
- Remove suspend_power_down() and call to it. Handled by PM core.
- Move swap file resetting and freeing of pagedir to swsusp_free()
- Remove extraneous in_atomic() checks. 
- Mark all resume functions __init.
- Move resume_suspend_image() inside swsusp_read() and cleanup. 
- Make do_magic() report error.
parent f2a93dbd
...@@ -38,7 +38,7 @@ struct saved_context { ...@@ -38,7 +38,7 @@ struct saved_context {
extern void save_processor_state(void); extern void save_processor_state(void);
extern void restore_processor_state(void); extern void restore_processor_state(void);
extern void do_magic(int resume); extern int do_magic(int resume);
#ifdef CONFIG_ACPI_SLEEP #ifdef CONFIG_ACPI_SLEEP
extern unsigned long saved_eip; extern unsigned long saved_eip;
......
...@@ -48,13 +48,6 @@ extern void drain_local_pages(void); ...@@ -48,13 +48,6 @@ extern void drain_local_pages(void);
extern unsigned int nr_copy_pages __nosavedata; extern unsigned int nr_copy_pages __nosavedata;
extern suspend_pagedir_t *pagedir_nosave __nosavedata; extern suspend_pagedir_t *pagedir_nosave __nosavedata;
/* Communication between kernel/suspend.c and arch/i386/suspend.c */
extern void do_magic_resume_1(void);
extern void do_magic_resume_2(void);
extern void do_magic_suspend_1(void);
extern void do_magic_suspend_2(void);
/* Communication between acpi and arch/i386/suspend.c */ /* Communication between acpi and arch/i386/suspend.c */
extern void do_suspend_lowlevel(int resume); extern void do_suspend_lowlevel(int resume);
......
...@@ -41,6 +41,11 @@ void pm_restore_console(void) ...@@ -41,6 +41,11 @@ void pm_restore_console(void)
console_loglevel = orig_loglevel; console_loglevel = orig_loglevel;
#ifdef SUSPEND_CONSOLE #ifdef SUSPEND_CONSOLE
set_console(orig_fgconsole); set_console(orig_fgconsole);
/* FIXME:
* This following part is left over from swsusp. Is it really needed?
*/
update_screen(fg_console);
#endif #endif
return; return;
} }
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment