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.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index e24446f8d8cd..0b43847dc980 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -53,7 +53,7 @@ static void power_down(suspend_disk_method_t mode)
53 53
54 switch(mode) { 54 switch(mode) {
55 case PM_DISK_PLATFORM: 55 case PM_DISK_PLATFORM:
56 kernel_power_off_prepare(); 56 kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
57 error = pm_ops->enter(PM_SUSPEND_DISK); 57 error = pm_ops->enter(PM_SUSPEND_DISK);
58 break; 58 break;
59 case PM_DISK_SHUTDOWN: 59 case PM_DISK_SHUTDOWN:
@@ -95,13 +95,6 @@ static int prepare_processes(void)
95 goto thaw; 95 goto thaw;
96 } 96 }
97 97
98 if (pm_disk_mode == PM_DISK_PLATFORM) {
99 if (pm_ops && pm_ops->prepare) {
100 if ((error = pm_ops->prepare(PM_SUSPEND_DISK)))
101 goto thaw;
102 }
103 }
104
105 /* Free memory before shutting down devices. */ 98 /* Free memory before shutting down devices. */
106 if (!(error = swsusp_shrink_memory())) 99 if (!(error = swsusp_shrink_memory()))
107 return 0; 100 return 0;
@@ -367,14 +360,14 @@ power_attr(resume);
367 360
368static ssize_t image_size_show(struct subsystem * subsys, char *buf) 361static ssize_t image_size_show(struct subsystem * subsys, char *buf)
369{ 362{
370 return sprintf(buf, "%u\n", image_size); 363 return sprintf(buf, "%lu\n", image_size);
371} 364}
372 365
373static ssize_t image_size_store(struct subsystem * subsys, const char * buf, size_t n) 366static ssize_t image_size_store(struct subsystem * subsys, const char * buf, size_t n)
374{ 367{
375 unsigned int size; 368 unsigned long size;
376 369
377 if (sscanf(buf, "%u", &size) == 1) { 370 if (sscanf(buf, "%lu", &size) == 1) {
378 image_size = size; 371 image_size = size;
379 return n; 372 return n;
380 } 373 }