summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/reboot.c
diff options
context:
space:
mode:
authorDmitry Osipenko <dmitry.osipenko@collabora.com>2022-05-10 02:32:26 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-05-19 20:30:31 +0300
commitd35773499329300d837818417f6d1b5a7987317d (patch)
tree072d8e824b930691bb66aefba25f196df6656eea /arch/x86/kernel/reboot.c
parent9b0d0af145195cfd79210b805448a4bcc69f0e04 (diff)
downloadlinux-d35773499329300d837818417f6d1b5a7987317d.tar.xz
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>
Diffstat (limited to 'arch/x86/kernel/reboot.c')
-rw-r--r--arch/x86/kernel/reboot.c4
1 files changed, 2 insertions, 2 deletions
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)
machine_shutdown();
- pm_power_off();
+ do_kernel_power_off();
}
/* A fallback in case there is no PM info available */
tboot_shutdown(TB_SHUTDOWN_HALT);