aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r--kernel/power/disk.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index 0b43847dc980..4eb464b71347 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -26,9 +26,9 @@ extern suspend_disk_method_t pm_disk_mode;
26 26
27extern int swsusp_shrink_memory(void); 27extern int swsusp_shrink_memory(void);
28extern int swsusp_suspend(void); 28extern int swsusp_suspend(void);
29extern int swsusp_write(struct pbe *pblist, unsigned int nr_pages); 29extern int swsusp_write(void);
30extern int swsusp_check(void); 30extern int swsusp_check(void);
31extern int swsusp_read(struct pbe **pblist_ptr); 31extern int swsusp_read(void);
32extern void swsusp_close(void); 32extern void swsusp_close(void);
33extern int swsusp_resume(void); 33extern int swsusp_resume(void);
34 34
@@ -70,10 +70,6 @@ static void power_down(suspend_disk_method_t mode)
70 while(1); 70 while(1);
71} 71}
72 72
73
74static int in_suspend __nosavedata = 0;
75
76
77static inline void platform_finish(void) 73static inline void platform_finish(void)
78{ 74{
79 if (pm_disk_mode == PM_DISK_PLATFORM) { 75 if (pm_disk_mode == PM_DISK_PLATFORM) {
@@ -145,7 +141,7 @@ int pm_suspend_disk(void)
145 if (in_suspend) { 141 if (in_suspend) {
146 device_resume(); 142 device_resume();
147 pr_debug("PM: writing image.\n"); 143 pr_debug("PM: writing image.\n");
148 error = swsusp_write(pagedir_nosave, nr_copy_pages); 144 error = swsusp_write();
149 if (!error) 145 if (!error)
150 power_down(pm_disk_mode); 146 power_down(pm_disk_mode);
151 else { 147 else {
@@ -216,7 +212,7 @@ static int software_resume(void)
216 212
217 pr_debug("PM: Reading swsusp image.\n"); 213 pr_debug("PM: Reading swsusp image.\n");
218 214
219 if ((error = swsusp_read(&pagedir_nosave))) { 215 if ((error = swsusp_read())) {
220 swsusp_free(); 216 swsusp_free();
221 goto Thaw; 217 goto Thaw;
222 } 218 }