diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
| commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
| tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /kernel/power/disk.c | |
| parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
| parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) | |
Merge branch 'linus'
Diffstat (limited to 'kernel/power/disk.c')
| -rw-r--r-- | kernel/power/disk.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 0b43847dc980..81d4d982f3f0 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
| @@ -22,17 +22,6 @@ | |||
| 22 | #include "power.h" | 22 | #include "power.h" |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | extern suspend_disk_method_t pm_disk_mode; | ||
| 26 | |||
| 27 | extern int swsusp_shrink_memory(void); | ||
| 28 | extern int swsusp_suspend(void); | ||
| 29 | extern int swsusp_write(struct pbe *pblist, unsigned int nr_pages); | ||
| 30 | extern int swsusp_check(void); | ||
| 31 | extern int swsusp_read(struct pbe **pblist_ptr); | ||
| 32 | extern void swsusp_close(void); | ||
| 33 | extern int swsusp_resume(void); | ||
| 34 | |||
| 35 | |||
| 36 | static int noresume = 0; | 25 | static int noresume = 0; |
| 37 | char resume_file[256] = CONFIG_PM_STD_PARTITION; | 26 | char resume_file[256] = CONFIG_PM_STD_PARTITION; |
| 38 | dev_t swsusp_resume_device; | 27 | dev_t swsusp_resume_device; |
| @@ -70,10 +59,6 @@ static void power_down(suspend_disk_method_t mode) | |||
| 70 | while(1); | 59 | while(1); |
| 71 | } | 60 | } |
| 72 | 61 | ||
| 73 | |||
| 74 | static int in_suspend __nosavedata = 0; | ||
| 75 | |||
| 76 | |||
| 77 | static inline void platform_finish(void) | 62 | static inline void platform_finish(void) |
| 78 | { | 63 | { |
| 79 | if (pm_disk_mode == PM_DISK_PLATFORM) { | 64 | if (pm_disk_mode == PM_DISK_PLATFORM) { |
| @@ -87,7 +72,6 @@ static int prepare_processes(void) | |||
| 87 | int error; | 72 | int error; |
| 88 | 73 | ||
| 89 | pm_prepare_console(); | 74 | pm_prepare_console(); |
| 90 | sys_sync(); | ||
| 91 | disable_nonboot_cpus(); | 75 | disable_nonboot_cpus(); |
| 92 | 76 | ||
| 93 | if (freeze_processes()) { | 77 | if (freeze_processes()) { |
| @@ -145,7 +129,7 @@ int pm_suspend_disk(void) | |||
| 145 | if (in_suspend) { | 129 | if (in_suspend) { |
| 146 | device_resume(); | 130 | device_resume(); |
| 147 | pr_debug("PM: writing image.\n"); | 131 | pr_debug("PM: writing image.\n"); |
| 148 | error = swsusp_write(pagedir_nosave, nr_copy_pages); | 132 | error = swsusp_write(); |
| 149 | if (!error) | 133 | if (!error) |
| 150 | power_down(pm_disk_mode); | 134 | power_down(pm_disk_mode); |
| 151 | else { | 135 | else { |
| @@ -216,7 +200,7 @@ static int software_resume(void) | |||
| 216 | 200 | ||
| 217 | pr_debug("PM: Reading swsusp image.\n"); | 201 | pr_debug("PM: Reading swsusp image.\n"); |
| 218 | 202 | ||
| 219 | if ((error = swsusp_read(&pagedir_nosave))) { | 203 | if ((error = swsusp_read())) { |
| 220 | swsusp_free(); | 204 | swsusp_free(); |
| 221 | goto Thaw; | 205 | goto Thaw; |
| 222 | } | 206 | } |
