summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorDmitry Osipenko <dmitry.osipenko@collabora.com>2022-06-17 14:24:02 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-06-21 20:57:30 +0200
commit202773260023b56e868d09d13d3a417028f1ff5b (patch)
tree8a4ad11a6df42587b35d3650a55faddf240e3632 /kernel/power
parentLinux 5.19-rc3 (diff)
downloadlinux-202773260023b56e868d09d13d3a417028f1ff5b.tar.xz
linux-202773260023b56e868d09d13d3a417028f1ff5b.zip
PM: hibernate: Use kernel_can_power_off()
Use new kernel_can_power_off() API instead of legacy pm_power_off global variable to fix regressed hibernation to disk where machine no longer powers off when it should because ACPI power driver transitioned to the new sys-off based API and it doesn't use pm_power_off anymore. Fixes: 98f30d0ecf79 ("ACPI: power: Switch to sys-off handler API") Tested-by: Ken Moffat <zarniwhoop@ntlworld.com> Reported-by: Ken Moffat <zarniwhhop@ntlworld.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/hibernate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 20a66bf9f465..89c71fce225d 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -665,7 +665,7 @@ static void power_down(void)
hibernation_platform_enter();
fallthrough;
case HIBERNATION_SHUTDOWN:
- if (pm_power_off)
+ if (kernel_can_power_off())
kernel_power_off();
break;
}