summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-03-01 18:34:38 -0500
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-03-08 19:32:32 -0500
commit0c749eacaa80a36b9d2b74c6c99c61baa0196eb9 (patch)
tree8b25a3305dba4fec74306f644ec99ef154ebcfcf /drivers/rtc
parentb9de1a1dae8c78de05a59e40632aa8241ef78e1a (diff)
rtc: omap: mark PM methods as __maybe_unused
Instead of using #ifdef guards around PM methods, let's annotate them as __maybe_unused, as it provides better compile coverage. Also drop empty stub for omap_rtc_runtime_resume(). Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-omap.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index 66c43a3ded24..13f7cd11c07e 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -882,8 +882,7 @@ static int omap_rtc_remove(struct platform_device *pdev)
882 return 0; 882 return 0;
883} 883}
884 884
885#ifdef CONFIG_PM_SLEEP 885static int __maybe_unused omap_rtc_suspend(struct device *dev)
886static int omap_rtc_suspend(struct device *dev)
887{ 886{
888 struct omap_rtc *rtc = dev_get_drvdata(dev); 887 struct omap_rtc *rtc = dev_get_drvdata(dev);
889 888
@@ -906,7 +905,7 @@ static int omap_rtc_suspend(struct device *dev)
906 return 0; 905 return 0;
907} 906}
908 907
909static int omap_rtc_resume(struct device *dev) 908static int __maybe_unused omap_rtc_resume(struct device *dev)
910{ 909{
911 struct omap_rtc *rtc = dev_get_drvdata(dev); 910 struct omap_rtc *rtc = dev_get_drvdata(dev);
912 911
@@ -921,10 +920,8 @@ static int omap_rtc_resume(struct device *dev)
921 920
922 return 0; 921 return 0;
923} 922}
924#endif
925 923
926#ifdef CONFIG_PM 924static int __maybe_unused omap_rtc_runtime_suspend(struct device *dev)
927static int omap_rtc_runtime_suspend(struct device *dev)
928{ 925{
929 struct omap_rtc *rtc = dev_get_drvdata(dev); 926 struct omap_rtc *rtc = dev_get_drvdata(dev);
930 927
@@ -934,16 +931,9 @@ static int omap_rtc_runtime_suspend(struct device *dev)
934 return 0; 931 return 0;
935} 932}
936 933
937static int omap_rtc_runtime_resume(struct device *dev)
938{
939 return 0;
940}
941#endif
942
943static const struct dev_pm_ops omap_rtc_pm_ops = { 934static const struct dev_pm_ops omap_rtc_pm_ops = {
944 SET_SYSTEM_SLEEP_PM_OPS(omap_rtc_suspend, omap_rtc_resume) 935 SET_SYSTEM_SLEEP_PM_OPS(omap_rtc_suspend, omap_rtc_resume)
945 SET_RUNTIME_PM_OPS(omap_rtc_runtime_suspend, 936 SET_RUNTIME_PM_OPS(omap_rtc_runtime_suspend, NULL, NULL)
946 omap_rtc_runtime_resume, NULL)
947}; 937};
948 938
949static void omap_rtc_shutdown(struct platform_device *pdev) 939static void omap_rtc_shutdown(struct platform_device *pdev)