mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-30 19:07:15 +00:00
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: d0bcd82b13
("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>
This commit is contained in:
parent
d0bcd82b13
commit
573e2bf054
1 changed files with 2 additions and 4 deletions
|
@ -221,8 +221,7 @@ static int xgene_rtc_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
static int __maybe_unused xgene_rtc_suspend(struct device *dev)
|
||||||
static int xgene_rtc_suspend(struct device *dev)
|
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct platform_device *pdev = to_platform_device(dev);
|
||||||
struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev);
|
struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev);
|
||||||
|
@ -246,7 +245,7 @@ static int xgene_rtc_suspend(struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int xgene_rtc_resume(struct device *dev)
|
static int __maybe_unused xgene_rtc_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct platform_device *pdev = to_platform_device(dev);
|
||||||
struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev);
|
struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev);
|
||||||
|
@ -271,7 +270,6 @@ static int xgene_rtc_resume(struct device *dev)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static SIMPLE_DEV_PM_OPS(xgene_rtc_pm_ops, xgene_rtc_suspend, xgene_rtc_resume);
|
static SIMPLE_DEV_PM_OPS(xgene_rtc_pm_ops, xgene_rtc_suspend, xgene_rtc_resume);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue