Skip to content

Commit a42048a

Browse files
arndbguilemop-ext
authored andcommitted
rtc: stm32: remove incorrect #ifdef check
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: 6beace8 ("rtc: stm32: change PM callbacks to "_noirq()"") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Valentin Caron <valentin.caron@foss.st.com> Change-Id: Id8aa7a287aa39b135c29f75d532db21691e57c20 Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/321068 ACI: CIBUILD <MDG-smet-aci-builds@list.st.com> ACI: CITOOLS <MDG-smet-aci-reviews@list.st.com> Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com> Domain-Review: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
1 parent 7293adc commit a42048a

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/rtc/rtc-stm32.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,6 @@ static int stm32_rtc_remove(struct platform_device *pdev)
10981098
return 0;
10991099
}
11001100

1101-
#ifdef CONFIG_PM_SLEEP
11021101
static int stm32_rtc_suspend(struct device *dev)
11031102
{
11041103
struct stm32_rtc *rtc = dev_get_drvdata(dev);
@@ -1129,7 +1128,6 @@ static int stm32_rtc_resume(struct device *dev)
11291128

11301129
return ret;
11311130
}
1132-
#endif
11331131

11341132
static const struct dev_pm_ops stm32_rtc_pm_ops = {
11351133
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(stm32_rtc_suspend, stm32_rtc_resume)

0 commit comments

Comments
 (0)