aboutsummaryrefslogtreecommitdiff
path: root/kernel/power/disk.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-30 18:23:30 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-30 18:23:30 +0100
commitc43e0e46adf79c321ed3fbf0351e1005fb8a2413 (patch)
tree35b9ab361651f649d3c9aa69f159812eba50d154 /kernel/power/disk.c
parentdba3d36b2f0842ed7f25c33cd3a2ccdb3d0df9db (diff)
parentf2257b70b0f9b2fe8f2afd83fc6798dca75930b8 (diff)
Merge branch 'linus' into core/percpu
Conflicts: kernel/irq/handle.c
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r--kernel/power/disk.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index 45e8541ab7e..432ee575c9e 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -71,6 +71,14 @@ void hibernation_set_ops(struct platform_hibernation_ops *ops)
mutex_unlock(&pm_mutex);
}
+static bool entering_platform_hibernation;
+
+bool system_entering_hibernation(void)
+{
+ return entering_platform_hibernation;
+}
+EXPORT_SYMBOL(system_entering_hibernation);
+
#ifdef CONFIG_PM_DEBUG
static void hibernation_debug_sleep(void)
{
@@ -411,6 +419,7 @@ int hibernation_platform_enter(void)
if (error)
goto Close;
+ entering_platform_hibernation = true;
suspend_console();
error = device_suspend(PMSG_HIBERNATE);
if (error) {
@@ -445,6 +454,7 @@ int hibernation_platform_enter(void)
Finish:
hibernation_ops->finish();
Resume_devices:
+ entering_platform_hibernation = false;
device_resume(PMSG_RESTORE);
resume_console();
Close: