]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Hibernate: Call platform_begin before swsusp_shrink_memory
authorZhang Rui <rui.zhang@intel.com>
Sun, 26 Oct 2008 19:50:26 +0000 (20:50 +0100)
committerLen Brown <len.brown@intel.com>
Fri, 19 Dec 2008 09:40:34 +0000 (04:40 -0500)
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>
kernel/power/disk.c

index c9d74083746f8839f96a5a37888302c41245797e..096fe4899ea4b40f2783c32da6cf8be43048a208 100644 (file)
@@ -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;