Commit 20277326 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Rafael J. Wysocki

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: 98f30d0e ("ACPI: power: Switch to sys-off handler API")
Tested-by: default avatarKen Moffat <zarniwhoop@ntlworld.com>
Reported-by: default avatarKen Moffat <zarniwhhop@ntlworld.com>
Signed-off-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent a111daf0
...@@ -665,7 +665,7 @@ static void power_down(void) ...@@ -665,7 +665,7 @@ static void power_down(void)
hibernation_platform_enter(); hibernation_platform_enter();
fallthrough; fallthrough;
case HIBERNATION_SHUTDOWN: case HIBERNATION_SHUTDOWN:
if (pm_power_off) if (kernel_can_power_off())
kernel_power_off(); kernel_power_off();
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment