diff options
author | David Vrabel <david.vrabel@csr.com> | 2009-02-02 12:52:39 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2009-02-02 12:52:39 -0500 |
commit | 8f04915532485d81e7f6c580a396ea7b01094221 (patch) | |
tree | c5740e961a025f2fb6b520a2bc5937f19d4345ab /kernel/power/disk.c | |
parent | 8f5140a6a0b1a9aa79585b0008e88c5d266c5c1d (diff) | |
parent | 45c82b5a770be66845687a7d027c8b52946d59af (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r-- | kernel/power/disk.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 45e8541ab7e3..432ee575c9ee 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
@@ -71,6 +71,14 @@ void hibernation_set_ops(struct platform_hibernation_ops *ops) | |||
71 | mutex_unlock(&pm_mutex); | 71 | mutex_unlock(&pm_mutex); |
72 | } | 72 | } |
73 | 73 | ||
74 | static bool entering_platform_hibernation; | ||
75 | |||
76 | bool system_entering_hibernation(void) | ||
77 | { | ||
78 | return entering_platform_hibernation; | ||
79 | } | ||
80 | EXPORT_SYMBOL(system_entering_hibernation); | ||
81 | |||
74 | #ifdef CONFIG_PM_DEBUG | 82 | #ifdef CONFIG_PM_DEBUG |
75 | static void hibernation_debug_sleep(void) | 83 | static void hibernation_debug_sleep(void) |
76 | { | 84 | { |
@@ -411,6 +419,7 @@ int hibernation_platform_enter(void) | |||
411 | if (error) | 419 | if (error) |
412 | goto Close; | 420 | goto Close; |
413 | 421 | ||
422 | entering_platform_hibernation = true; | ||
414 | suspend_console(); | 423 | suspend_console(); |
415 | error = device_suspend(PMSG_HIBERNATE); | 424 | error = device_suspend(PMSG_HIBERNATE); |
416 | if (error) { | 425 | if (error) { |
@@ -445,6 +454,7 @@ int hibernation_platform_enter(void) | |||
445 | Finish: | 454 | Finish: |
446 | hibernation_ops->finish(); | 455 | hibernation_ops->finish(); |
447 | Resume_devices: | 456 | Resume_devices: |
457 | entering_platform_hibernation = false; | ||
448 | device_resume(PMSG_RESTORE); | 458 | device_resume(PMSG_RESTORE); |
449 | resume_console(); | 459 | resume_console(); |
450 | Close: | 460 | Close: |