Skip to content

Commit 2027732

Browse files
digetxrafaeljw
authored andcommitted
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: 98f30d0 ("ACPI: power: Switch to sys-off handler API") Tested-by: Ken Moffat <[email protected]> Reported-by: Ken Moffat <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent a111daf commit 2027732

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/power/hibernate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ static void power_down(void)
665665
hibernation_platform_enter();
666666
fallthrough;
667667
case HIBERNATION_SHUTDOWN:
668-
if (pm_power_off)
668+
if (kernel_can_power_off())
669669
kernel_power_off();
670670
break;
671671
}

0 commit comments

Comments
 (0)