aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2008-10-26 15:50:26 -0400
committerLen Brown <len.brown@intel.com>2008-12-19 04:40:34 -0500
commit3fe0313e6ec572e6bb3f9d247316a834336db4be (patch)
treea066731451d4a8da20b2c85211edba8a5ccefb32 /kernel/power
parent929096fe9ff1f4b3645cf3919527ab47e8d5e17c (diff)
Hibernate: Call platform_begin before swsusp_shrink_memory
Call platform_begin() before swsusp_shrink_memory() so that we can always allocate enough memory to save the ACPI NVS region from platform_begin(). Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Nigel Cunningham <nigel@tuxonice.net> Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/disk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index c9d74083746f..096fe4899ea4 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -259,12 +259,12 @@ int hibernation_snapshot(int platform_mode)
259{ 259{
260 int error, ftrace_save; 260 int error, ftrace_save;
261 261
262 /* Free memory before shutting down devices. */ 262 error = platform_begin(platform_mode);
263 error = swsusp_shrink_memory();
264 if (error) 263 if (error)
265 return error; 264 return error;
266 265
267 error = platform_begin(platform_mode); 266 /* Free memory before shutting down devices. */
267 error = swsusp_shrink_memory();
268 if (error) 268 if (error)
269 goto Close; 269 goto Close;
270 270