Skip to content

Commit d357734

Browse files
digetxrafaeljw
authored andcommitted
x86: 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. 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 9b0d0af commit d357734

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kernel/reboot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,10 +739,10 @@ static void native_machine_halt(void)
739739

740740
static void native_machine_power_off(void)
741741
{
742-
if (pm_power_off) {
742+
if (kernel_can_power_off()) {
743743
if (!reboot_force)
744744
machine_shutdown();
745-
pm_power_off();
745+
do_kernel_power_off();
746746
}
747747
/* A fallback in case there is no PM info available */
748748
tboot_shutdown(TB_SHUTDOWN_HALT);

0 commit comments

Comments
 (0)