aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-meson-vrtc.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-09-06 17:24:29 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-09-10 16:14:15 +0200
commitb99a3120f9a30e1429d8d634e18da8dff93340c6 (patch)
treed6ae850c3852bb21a40b342478960d12297cf08f /drivers/rtc/rtc-meson-vrtc.c
parente02e3ddac7722b879b6f3c781b45beea2173f562 (diff)
downloadlinux-b99a3120f9a30e1429d8d634e18da8dff93340c6.tar.gz
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 <arnd@arndb.de> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Link: https://lore.kernel.org/r/20190906152438.1533833-1-arnd@arndb.de Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-meson-vrtc.c')
-rw-r--r--drivers/rtc/rtc-meson-vrtc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-meson-vrtc.c b/drivers/rtc/rtc-meson-vrtc.c
index 4621a47151796..89e5ba0dae69f 100644
--- a/drivers/rtc/rtc-meson-vrtc.c
+++ b/drivers/rtc/rtc-meson-vrtc.c
@@ -91,8 +91,7 @@ static int meson_vrtc_probe(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
-static int meson_vrtc_suspend(struct device *dev)
+static int __maybe_unused meson_vrtc_suspend(struct device *dev)
{
struct meson_vrtc_data *vrtc = dev_get_drvdata(dev);
@@ -121,7 +120,7 @@ static int meson_vrtc_suspend(struct device *dev)
return 0;
}
-static int meson_vrtc_resume(struct device *dev)
+static int __maybe_unused meson_vrtc_resume(struct device *dev)
{
struct meson_vrtc_data *vrtc = dev_get_drvdata(dev);
@@ -131,7 +130,7 @@ static int meson_vrtc_resume(struct device *dev)
meson_vrtc_set_wakeup_time(vrtc, 0);
return 0;
}
-#endif
+
static SIMPLE_DEV_PM_OPS(meson_vrtc_pm_ops,
meson_vrtc_suspend, meson_vrtc_resume);