@@ -142,7 +142,6 @@ struct machdep_calls {
#endif
void (*restart)(char *cmd);
- void (*power_off)(void);
void (*halt)(void);
void (*panic)(char *str);
void (*cpu_die)(void);
@@ -139,9 +139,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();
@@ -153,7 +151,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)
@@ -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();
}
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@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(-)