diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-27 15:50:41 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-27 15:50:41 (GMT) |
commit | 490a8d70cdd77d6262c3d5815bc0b1c54a3a63f8 (patch) | |
tree | cf8feb25b7ce349b375a6bdfab8d4d83b3fc9715 /kernel | |
parent | 8c022fdd5fc1b9949bad21d26e0cb115d045c7f9 (diff) | |
parent | 5f451fe1ab5d73b987051f0d23c85216c552e163 (diff) | |
download | linux-fsl-qoriq-490a8d70cdd77d6262c3d5815bc0b1c54a3a63f8.tar.xz |
Merge branch 'hibern_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'hibern_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
SATA PIIX: Blacklist system that spins off disks during ACPI power off
SATA Sil: Blacklist system that spins off disks during ACPI power off
SATA AHCI: Blacklist system that spins off disks during ACPI power off
SATA: Blacklisting of systems that spin off disks during ACPI power off
DMI: Introduce dmi_first_match to make the interface more flexible
Hibernation: Introduce system_entering_hibernation
Diffstat (limited to 'kernel')
-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 45e8541..432ee57 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: |