[PATCH 20/20] powerpc: Remove ppc_md.power_off
Alexander Graf
agraf at suse.de
Wed Oct 1 23:28:06 EST 2014
Now that we have all implementations of ppc_md.power_off converted to
pm_power_off we can remove the ppc_md variant.
While at it, also set the default for pm_power_off to NULL so that non
machine drivers can implement overrides.
Signed-off-by: Alexander Graf <agraf at suse.de>
---
arch/powerpc/include/asm/machdep.h | 1 -
arch/powerpc/kernel/setup-common.c | 6 ++----
arch/powerpc/xmon/xmon.c | 2 --
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index b125cea..10dc008 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -144,7 +144,6 @@ struct machdep_calls {
#endif
void (*restart)(char *cmd);
- void (*power_off)(void);
void (*halt)(void);
void (*panic)(char *str);
void (*cpu_die)(void);
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 5dfcb28..58a260f 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -138,9 +138,7 @@ void machine_restart(char *cmd)
void machine_power_off(void)
{
machine_shutdown();
- if (ppc_md.power_off)
- ppc_md.power_off();
- if (pm_power_off != machine_power_off)
+ if (pm_power_off)
pm_power_off();
#ifdef CONFIG_SMP
smp_send_stop();
@@ -152,7 +150,7 @@ void machine_power_off(void)
/* Used by the G5 thermal driver */
EXPORT_SYMBOL_GPL(machine_power_off);
-void (*pm_power_off)(void) = machine_power_off;
+void (*pm_power_off)(void);
EXPORT_SYMBOL_GPL(pm_power_off);
void machine_halt(void)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 531f649..506d256 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -981,8 +981,6 @@ static void bootcmds(void)
else if (cmd == 'h')
ppc_md.halt();
else if (cmd == 'p')
- if (ppc_md.power_off)
- ppc_md.power_off();
if (pm_power_off)
pm_power_off();
}
--
1.8.1.4
More information about the Linuxppc-dev
mailing list