diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-11-08 07:08:10 -0500 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-11-08 19:25:47 -0500 |
commit | 573e2bf05421d0dc69dc3c604f286b3473d2f2cd (patch) | |
tree | 8da6e114902659d25c6da405f41c2275080f4291 | |
parent | d0bcd82b13794c4bc89876e9383000fc1cb069d2 (diff) |
rtc: xgene: mark PM functions as __maybe_unused
The new xgene_rtc_alarm_irq_enabled() function is only accessed
from PM code, which is inside of an #ifdef; this causes a harmless
build warning when CONFIG_PM is disabled:
drivers/rtc/rtc-xgene.c:108:12: error: 'xgene_rtc_alarm_irq_enabled' defined but not used [-Werror=unused-function]
Just remove the #ifdef and use __maybe_unused annotations instead,
to make the code more robust here.
Fixes: d0bcd82b1379 ("rtc: xgene: Fix suspend/resume")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Loc Ho <lho@apm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-rw-r--r-- | drivers/rtc/rtc-xgene.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-xgene.c b/drivers/rtc/rtc-xgene.c index 360eae24a8c8..0c34d3b81279 100644 --- a/drivers/rtc/rtc-xgene.c +++ b/drivers/rtc/rtc-xgene.c | |||
@@ -221,8 +221,7 @@ static int xgene_rtc_remove(struct platform_device *pdev) | |||
221 | return 0; | 221 | return 0; |
222 | } | 222 | } |
223 | 223 | ||
224 | #ifdef CONFIG_PM_SLEEP | 224 | static int __maybe_unused xgene_rtc_suspend(struct device *dev) |
225 | static int xgene_rtc_suspend(struct device *dev) | ||
226 | { | 225 | { |
227 | struct platform_device *pdev = to_platform_device(dev); | 226 | struct platform_device *pdev = to_platform_device(dev); |
228 | struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev); | 227 | struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev); |
@@ -246,7 +245,7 @@ static int xgene_rtc_suspend(struct device *dev) | |||
246 | return 0; | 245 | return 0; |
247 | } | 246 | } |
248 | 247 | ||
249 | static int xgene_rtc_resume(struct device *dev) | 248 | static int __maybe_unused xgene_rtc_resume(struct device *dev) |
250 | { | 249 | { |
251 | struct platform_device *pdev = to_platform_device(dev); | 250 | struct platform_device *pdev = to_platform_device(dev); |
252 | struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev); | 251 | struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev); |
@@ -271,7 +270,6 @@ static int xgene_rtc_resume(struct device *dev) | |||
271 | 270 | ||
272 | return 0; | 271 | return 0; |
273 | } | 272 | } |
274 | #endif | ||
275 | 273 | ||
276 | static SIMPLE_DEV_PM_OPS(xgene_rtc_pm_ops, xgene_rtc_suspend, xgene_rtc_resume); | 274 | static SIMPLE_DEV_PM_OPS(xgene_rtc_pm_ops, xgene_rtc_suspend, xgene_rtc_resume); |
277 | 275 | ||