From: Zhang Rui Date: Sun, 26 Oct 2008 19:50:26 +0000 (+0100) Subject: Hibernate: Call platform_begin before swsusp_shrink_memory X-Git-Tag: v2.6.29-rc1~34^2~3^2~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3fe0313e6ec572e6bb3f9d247316a834336db4be;p=linux-2.6-omap-h63xx.git 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 Acked-by: Nigel Cunningham Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki Signed-off-by: Len Brown --- diff --git a/kernel/power/disk.c b/kernel/power/disk.c index c9d74083746..096fe4899ea 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;