From: Zhang Rui <rui.zhang@xxxxxxxxx> 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@xxxxxxxxx> Acked-by: Nigel Cunningham <nigel@xxxxxxxxxxxx> Acked-by: Pavel Machek <pavel@xxxxxxx> Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> Signed-off-by: Len Brown <len.brown@xxxxxxxxx> --- kernel/power/disk.c | 6 +++--- 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; -- 1.5.6.5 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html