]> Gentwo Git Trees - linux/.git/commit
PM: hibernate: Fix pm_hibernation_mode_is_suspend() build breakage
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 26 Sep 2025 11:10:22 +0000 (13:10 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 26 Sep 2025 16:53:48 +0000 (18:53 +0200)
commitbbfe987c5a2854705393ad79813074e5eadcbde6
tree0407ba88323a216d6fbbe836156d68c0190b99e2
parent0a6e9e098fcc318fec0f45a05a5c4743a81a60d9
PM: hibernate: Fix pm_hibernation_mode_is_suspend() build breakage

Commit 495c8d35035e ("PM: hibernate: Add pm_hibernation_mode_is_suspend()")
that introduced pm_hibernation_mode_is_suspend() did not define it in
the case when CONFIG_HIBERNATION is unset, but CONFIG_SUSPEND is set.

Subsequent commit 0a6e9e098fcc ("drm/amd: Fix hybrid sleep") made the
amdgpu driver use that function which led to kernel build breakage in
the case mentioned above [1].

Address this by using appropriate #ifdeffery around the definition of
pm_hibernation_mode_is_suspend().

Fixes: 0a6e9e098fcc ("drm/amd: Fix hybrid sleep")
Reported-by: KernelCI bot <bot@kernelci.org>
Closes: https://groups.io/g/kernelci-results/topic/regression_pm_testing/115439919 [1]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
include/linux/suspend.h