diff mbox series

[v7,14/20] x86: Use do_kernel_power_off()

Message ID 20220411233832.391817-15-dmitry.osipenko@collabora.com (mailing list archive)
State New
Headers show
Series Introduce power-off+restart call chain API | expand

Commit Message

Dmitry Osipenko April 11, 2022, 11:38 p.m. UTC
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 power-off API.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
 arch/x86/kernel/reboot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series


diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index fa700b46588e..c3636ea4aa71 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -739,10 +739,10 @@  static void native_machine_halt(void)
 static void native_machine_power_off(void)
-	if (pm_power_off) {
+	if (kernel_can_power_off()) {
 		if (!reboot_force)
-		pm_power_off();
+		do_kernel_power_off();
 	/* A fallback in case there is no PM info available */