summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2008-10-26 20:50:26 +0100
committerLen Brown <len.brown@intel.com>2008-12-19 04:40:34 -0500
commit3fe0313e6ec572e6bb3f9d247316a834336db4be (patch)
treea066731451d4a8da20b2c85211edba8a5ccefb32 /kernel/power
parent929096fe9ff1f4b3645cf3919527ab47e8d5e17c (diff)
downloadop-kernel-dev-3fe0313e6ec572e6bb3f9d247316a834336db4be.zip
op-kernel-dev-3fe0313e6ec572e6bb3f9d247316a834336db4be.tar.gz
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 c9d7408..096fe48 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -259,12 +259,12 @@ int hibernation_snapshot(int platform_mode)
{
int error, ftrace_save;
- /* Free memory before shutting down devices. */
- error = swsusp_shrink_memory();
+ error = platform_begin(platform_mode);
if (error)
return error;
- error = platform_begin(platform_mode);
+ /* Free memory before shutting down devices. */
+ error = swsusp_shrink_memory();
if (error)
goto Close;
OpenPOWER on IntegriCloud