Thread (101 messages) 101 messages, 22 authors, 2015-06-18
STALE4004d
Revisions (4)
  1. rfc [diff vs current]
  2. v1 [diff vs current]
  3. v1 current
  4. v2 [diff vs current]

[PATCH 03/44] hibernate: Call have_kernel_poweroff instead of checking pm_power_off

From: Guenter Roeck <linux@roeck-us.net>
Date: 2014-10-07 05:29:09
Also in: linux-acpi, linux-alpha, linux-arm-kernel, linux-devicetree, linux-efi, linux-mips, linux-pm, linux-s390, linux-sh, linux-tegra, linux-um, lkml
Subsystem: hibernation (aka software suspend, aka swsusp), suspend to ram, the rest · Maintainers: "Rafael J. Wysocki", Linus Torvalds

Poweroff handlers may now be installed with register_poweroff_handler.
Use the new API function have_kernel_poweroff to determine if a poweroff
handler has been installed.

Cc: Rafael J. Wysocki <redacted>
Cc: Pavel Machek <redacted>
Cc: Len Brown <redacted>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 kernel/power/hibernate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index a9dfa79..20353c5 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -602,7 +602,7 @@ static void power_down(void)
 	case HIBERNATION_PLATFORM:
 		hibernation_platform_enter();
 	case HIBERNATION_SHUTDOWN:
-		if (pm_power_off)
+		if (have_kernel_poweroff())
 			kernel_power_off();
 		break;
 #ifdef CONFIG_SUSPEND
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help