diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-09-04 08:09:09 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-04 08:09:09 -0700 |
commit | 0ccd8c39bc664bf5e9fcc26caad50cc17ff866d1 (patch) | |
tree | 29cec0edf3acf18c6978b750a8d6560f445df6df /kernel/power/disk.c | |
parent | 1625324d22409e32e3f8eb86018cad72e1c09d61 (diff) | |
parent | ec0c15afb41fd9ad45b53468b60db50170e22346 (diff) | |
download | kernel_samsung_aries-0ccd8c39bc664bf5e9fcc26caad50cc17ff866d1.zip kernel_samsung_aries-0ccd8c39bc664bf5e9fcc26caad50cc17ff866d1.tar.gz kernel_samsung_aries-0ccd8c39bc664bf5e9fcc26caad50cc17ff866d1.tar.bz2 |
Merge branch 'linus' into x86/core
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r-- | kernel/power/disk.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index f011e08..bbd85c6 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c @@ -21,6 +21,7 @@ #include <linux/console.h> #include <linux/cpu.h> #include <linux/freezer.h> +#include <linux/ftrace.h> #include "power.h" @@ -255,7 +256,7 @@ static int create_image(int platform_mode) int hibernation_snapshot(int platform_mode) { - int error; + int error, ftrace_save; /* Free memory before shutting down devices. */ error = swsusp_shrink_memory(); @@ -267,6 +268,7 @@ int hibernation_snapshot(int platform_mode) goto Close; suspend_console(); + ftrace_save = __ftrace_enabled_save(); error = device_suspend(PMSG_FREEZE); if (error) goto Recover_platform; @@ -296,6 +298,7 @@ int hibernation_snapshot(int platform_mode) Resume_devices: device_resume(in_suspend ? (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); + __ftrace_enabled_restore(ftrace_save); resume_console(); Close: platform_end(platform_mode); @@ -366,10 +369,11 @@ static int resume_target_kernel(void) int hibernation_restore(int platform_mode) { - int error; + int error, ftrace_save; pm_prepare_console(); suspend_console(); + ftrace_save = __ftrace_enabled_save(); error = device_suspend(PMSG_QUIESCE); if (error) goto Finish; @@ -384,6 +388,7 @@ int hibernation_restore(int platform_mode) platform_restore_cleanup(platform_mode); device_resume(PMSG_RECOVER); Finish: + __ftrace_enabled_restore(ftrace_save); resume_console(); pm_restore_console(); return error; @@ -396,7 +401,7 @@ int hibernation_restore(int platform_mode) int hibernation_platform_enter(void) { - int error; + int error, ftrace_save; if (!hibernation_ops) return -ENOSYS; @@ -411,6 +416,7 @@ int hibernation_platform_enter(void) goto Close; suspend_console(); + ftrace_save = __ftrace_enabled_save(); error = device_suspend(PMSG_HIBERNATE); if (error) { if (hibernation_ops->recover) @@ -445,6 +451,7 @@ int hibernation_platform_enter(void) hibernation_ops->finish(); Resume_devices: device_resume(PMSG_RESTORE); + __ftrace_enabled_restore(ftrace_save); resume_console(); Close: hibernation_ops->end(); |