Skip to content

Commit b99a312

Browse files
arndbalexandrebelloni
authored andcommitted
rtc: meson: mark PM functions as __maybe_unused
The meson_vrtc_set_wakeup_time() function is only used by the PM functions and causes a warning when they are disabled: drivers/rtc/rtc-meson-vrtc.c:32:13: error: unused function 'meson_vrtc_set_wakeup_time' [-Werror,-Wunused-function] Remove the #ifdef around the callers and add a __maybe_unused annotation as a more reliable way to avoid these warnings. Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent e02e3dd commit b99a312

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/rtc/rtc-meson-vrtc.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ static int meson_vrtc_probe(struct platform_device *pdev)
9191
return 0;
9292
}
9393

94-
#ifdef CONFIG_PM_SLEEP
95-
static int meson_vrtc_suspend(struct device *dev)
94+
static int __maybe_unused meson_vrtc_suspend(struct device *dev)
9695
{
9796
struct meson_vrtc_data *vrtc = dev_get_drvdata(dev);
9897

@@ -121,7 +120,7 @@ static int meson_vrtc_suspend(struct device *dev)
121120
return 0;
122121
}
123122

124-
static int meson_vrtc_resume(struct device *dev)
123+
static int __maybe_unused meson_vrtc_resume(struct device *dev)
125124
{
126125
struct meson_vrtc_data *vrtc = dev_get_drvdata(dev);
127126

@@ -131,7 +130,7 @@ static int meson_vrtc_resume(struct device *dev)
131130
meson_vrtc_set_wakeup_time(vrtc, 0);
132131
return 0;
133132
}
134-
#endif
133+
135134
static SIMPLE_DEV_PM_OPS(meson_vrtc_pm_ops,
136135
meson_vrtc_suspend, meson_vrtc_resume);
137136

0 commit comments

Comments
 (0)