[PATCH v4 1/3] clocksource: acpi_pm: Add stubs for suspend/resume callback helpers
From: Tzung-Bi Shih
Date: Wed Nov 18 2026 - 22:02:54 EST
Commit 56bd72e9cd82 ("clocksource: acpi_pm: Add external callback for
suspend/resume") declared acpi_pmtmr_register_suspend_resume_callback()
and acpi_pmtmr_unregister_suspend_resume_callback() only under
CONFIG_X86_PM_TIMER.
Provide static inline stubs in the #else branch so callers can guard
registration with IS_ENABLED(CONFIG_X86_PM_TIMER).
Signed-off-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
---
v4:
- New to the series.
---
include/linux/acpi_pmtmr.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/acpi_pmtmr.h b/include/linux/acpi_pmtmr.h
index cceed294d0b5..94ddc04fe3f1 100644
--- a/include/linux/acpi_pmtmr.h
+++ b/include/linux/acpi_pmtmr.h
@@ -48,6 +48,11 @@ static inline u32 acpi_pm_read_early(void)
return 0;
}
+static inline void acpi_pmtmr_register_suspend_resume_callback(void (*cb)(void *data, bool suspend),
+ void *data) {}
+
+static inline void acpi_pmtmr_unregister_suspend_resume_callback(void) {}
+
#endif
#endif
--
2.56.1.708.g77570a6a1d-goog