Skip to content

Commit c33fd0b

Browse files
digetxrafaeljw
authored andcommitted
powerpc: Use do_kernel_power_off()
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new sys-off API. Acked-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent f089ab6 commit c33fd0b

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

arch/powerpc/kernel/setup-common.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ void machine_restart(char *cmd)
161161
void machine_power_off(void)
162162
{
163163
machine_shutdown();
164-
if (pm_power_off)
165-
pm_power_off();
166-
164+
do_kernel_power_off();
167165
smp_send_stop();
168166
machine_hang();
169167
}

arch/powerpc/xmon/xmon.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,8 +1243,7 @@ static void bootcmds(void)
12431243
} else if (cmd == 'h') {
12441244
ppc_md.halt();
12451245
} else if (cmd == 'p') {
1246-
if (pm_power_off)
1247-
pm_power_off();
1246+
do_kernel_power_off();
12481247
}
12491248
}
12501249

0 commit comments

Comments
 (0)