PM: hibernate: Add stub for pm_hibernate_is_recovering()
authorMario Limonciello <mario.limonciello@amd.com>
Sat, 12 Jul 2025 23:37:12 +0000 (18:37 -0500)
committerMario Limonciello <mario.limonciello@amd.com>
Sun, 13 Jul 2025 11:55:31 +0000 (06:55 -0500)
commita6cfa4c8833944f8912c1fa7f95795753f6376ea
tree6d985817da140118bed5988dafe6f4d0538d4ec8
parent917b10d90990fd2138b5dbc2d22cfa428c070ade
PM: hibernate: Add stub for pm_hibernate_is_recovering()

Randy reports that amdgpu fails to compile with the following error:
ERROR: modpost: "pm_hibernate_is_recovering" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

This happens because pm_hibernate_is_recovering() is only compiled when
CONFIG_PM_SLEEP is set.  Add a stub for it so that drivers don't need
to depend upon CONFIG_PM.

Cc: Samuel Zhang <guoqing.zhang@amd.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/dri-devel/CAJZ5v0h1CX+aTu7dFy6vB-9LM6t5J4rt7Su3qVnq1xx-BFAm=Q@mail.gmail.com/T/#m2b9fe212b35fde11d58fcbc4e0727bc02ebba7b0
Fixes: c2aaddbd2dede ("PM: hibernate: add new api pm_hibernate_is_recovering()")
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20250712233715.821424-1-superm1@kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
include/linux/suspend.h