[PATCH v2 01/20] powerpc: Support override of pm_power_off

Alexander Graf agraf at suse.de
Tue Oct 14 01:01:09 AEDT 2014

The pm_power_off callback is what drivers are supposed to modify when they
implement power off support for the system.

Support a modified callback on powerpc. That way power off support code can
now either override ppc_md.power_off or pm_power_off.

Signed-off-by: Alexander Graf <agraf at suse.de>
 arch/powerpc/kernel/setup-common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 1362cd6..6398239 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -141,6 +141,8 @@ void machine_power_off(void)
 	if (ppc_md.power_off)
+	if (pm_power_off != machine_power_off)
+		pm_power_off();
 #ifdef CONFIG_SMP

More information about the Linuxppc-dev mailing list