rtc: stm32: Use NOIRQ_SYSTEM_SLEEP_PM_OPS()
Subsystems (2)
PATCH 1/1 rtc: stm32: Use NOIRQ_SYSTEM_SLEEP_PM_OPS()
If CONFIG_PM_SLEEP=n (e.g. m68k/allmodconfig):
drivers/rtc/rtc-stm32.c:904:12: error: ‘stm32_rtc_resume’ defined but not used [-Werror=unused-function]
904 | static int stm32_rtc_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~
drivers/rtc/rtc-stm32.c:894:12: error: ‘stm32_rtc_suspend’ defined but not used [-Werror=unused-function]
894 | static int stm32_rtc_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~
Indeed, the previous change mixed up the semantics between SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and NOIRQ_SYSTEM_SLEEP_PM_OPS(). Fix this by using the modern NOIRQ_SYSTEM_SLEEP_PM_OPS() instead.
--- drivers/rtc/rtc-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-stm32.c +1 -1
@@ -923,7 +923,7 @@ static int stm32_rtc_resume(struct device *dev) }static const struct dev_pm_ops stm32_rtc_pm_ops = { -SET_NOIRQ_SYSTEM_SLEEP_PM_OPS (stm32_rtc_suspend, stm32_rtc_resume) +NOIRQ_SYSTEM_SLEEP_PM_OPS (stm32_rtc_suspend, stm32_rtc_resume) };static struct platform_driver stm32_rtc_driver = {
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 11 lines · Geert Uytterhoeven
If
CONFIG_PM_SLEEP=n(e.g. m68k/allmodconfig):drivers/rtc/rtc-stm32.c:904:12: error: ‘stm32_rtc_resume’ defined but not used [-Werror=unused-function] 904 | static int stm32_rtc_resume(struct device *dev) | ^~~~~~~~~~~~~~~~ drivers/rtc/rtc-stm32.c:894:12: error: ‘stm32_rtc_suspend’ definedbut not used [-Werror=unused-function]
894 | static intstm32_rtc_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~
Quoted 7 lines
Indeed, the previous change mixed up the semantics between
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS()andNOIRQ_SYSTEM_SLEEP_PM_OPS(). Fix this by using the modernNOIRQ_SYSTEM_SLEEP_PM_OPS()instead.Reported-by [email protected]Fixes a69c610e13e2b2de ("rtc: stm32: remove incorrect #ifdef check")Signed-off-by Geert Uytterhoeven <[email protected]>
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel