public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: stm32: remove incorrect #ifdef check
@ 2023-08-01 10:59 Arnd Bergmann
  2023-08-01 13:55 ` Valentin CARON
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Arnd Bergmann @ 2023-08-01 10:59 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Arnd Bergmann, Alessandro Zummo, Maxime Coquelin,
	Alexandre Torgue, Valentin Caron, Antonio Borneo, Amelie Delaunay,
	Christophe Guibout, Gabriel Fernandez, linux-rtc, linux-stm32,
	linux-arm-kernel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

After a previous commit changed the driver over to
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(), the suspend/resume
functions must no longer be hidden behind an #ifdef:

In file included from include/linux/clk.h:13,
                 from drivers/rtc/rtc-stm32.c:8:
drivers/rtc/rtc-stm32.c:927:39: error: 'stm32_rtc_suspend' undeclared here (not in a function); did you mean 'stm32_rtc_probe'?
  927 |         SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(stm32_rtc_suspend, stm32_rtc_resume)
      |                                       ^~~~~~~~~~~~~~~~~
include/linux/kernel.h:58:44: note: in definition of macro 'PTR_IF'
   58 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
      |                                            ^~~
include/linux/pm.h:329:26: note: in expansion of macro 'pm_sleep_ptr'
  329 |         .suspend_noirq = pm_sleep_ptr(suspend_fn), \
      |                          ^~~~~~~~~~~~

Fixes: fb9a7e5360dc8 ("rtc: stm32: change PM callbacks to "_noirq()"")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/rtc/rtc-stm32.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c
index 85689192fa7ae..c296e7af0700c 100644
--- a/drivers/rtc/rtc-stm32.c
+++ b/drivers/rtc/rtc-stm32.c
@@ -890,7 +890,6 @@ static void stm32_rtc_remove(struct platform_device *pdev)
 	device_init_wakeup(&pdev->dev, false);
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int stm32_rtc_suspend(struct device *dev)
 {
 	struct stm32_rtc *rtc = dev_get_drvdata(dev);
@@ -921,7 +920,6 @@ static int stm32_rtc_resume(struct device *dev)
 
 	return ret;
 }
-#endif
 
 static const struct dev_pm_ops stm32_rtc_pm_ops = {
 	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(stm32_rtc_suspend, stm32_rtc_resume)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-16 11:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 10:59 [PATCH] rtc: stm32: remove incorrect #ifdef check Arnd Bergmann
2023-08-01 13:55 ` Valentin CARON
2023-08-09 16:36 ` kernel test robot
2023-08-09 18:24   ` Arnd Bergmann
2023-08-16 11:35     ` Geert Uytterhoeven
2023-08-10  7:22 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox