]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rtc: omap: mark PM methods as __maybe_unused
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 1 Mar 2017 23:34:38 +0000 (15:34 -0800)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 9 Mar 2017 00:32:32 +0000 (01:32 +0100)
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>
drivers/rtc/rtc-omap.c

index 66c43a3ded24e5721c8ae31ade9ae1b5617e0c8e..13f7cd11c07eb52948121225242b57f8ab2c8e2c 100644 (file)
@@ -882,8 +882,7 @@ static int omap_rtc_remove(struct platform_device *pdev)
        return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int omap_rtc_suspend(struct device *dev)
+static int __maybe_unused omap_rtc_suspend(struct device *dev)
 {
        struct omap_rtc *rtc = dev_get_drvdata(dev);
 
@@ -906,7 +905,7 @@ static int omap_rtc_suspend(struct device *dev)
        return 0;
 }
 
-static int omap_rtc_resume(struct device *dev)
+static int __maybe_unused omap_rtc_resume(struct device *dev)
 {
        struct omap_rtc *rtc = dev_get_drvdata(dev);
 
@@ -921,10 +920,8 @@ static int omap_rtc_resume(struct device *dev)
 
        return 0;
 }
-#endif
 
-#ifdef CONFIG_PM
-static int omap_rtc_runtime_suspend(struct device *dev)
+static int __maybe_unused omap_rtc_runtime_suspend(struct device *dev)
 {
        struct omap_rtc *rtc = dev_get_drvdata(dev);
 
@@ -934,16 +931,9 @@ static int omap_rtc_runtime_suspend(struct device *dev)
        return 0;
 }
 
-static int omap_rtc_runtime_resume(struct device *dev)
-{
-       return 0;
-}
-#endif
-
 static const struct dev_pm_ops omap_rtc_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(omap_rtc_suspend, omap_rtc_resume)
-       SET_RUNTIME_PM_OPS(omap_rtc_runtime_suspend,
-                          omap_rtc_runtime_resume, NULL)
+       SET_RUNTIME_PM_OPS(omap_rtc_runtime_suspend, NULL, NULL)
 };
 
 static void omap_rtc_shutdown(struct platform_device *pdev)