]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
thermal: qoriq: Use __maybe_unused instead of #if CONFIG_PM_SLEEP
authorAnson Huang <Anson.Huang@nxp.com>
Tue, 30 Jul 2019 02:21:25 +0000 (10:21 +0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 28 Aug 2019 08:33:27 +0000 (16:33 +0800)
Use __maybe_unused for power management related functions
instead of #if CONFIG_PM_SLEEP to simply the code.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/qoriq_thermal.c

index 8d19601d0ca67c09da7ae805f7a04ee33ddf882d..39542c670301144406470b4cc407edd51f576278 100644 (file)
@@ -256,8 +256,7 @@ static int qoriq_tmu_remove(struct platform_device *pdev)
        return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int qoriq_tmu_suspend(struct device *dev)
+static int __maybe_unused qoriq_tmu_suspend(struct device *dev)
 {
        u32 tmr;
        struct qoriq_tmu_data *data = dev_get_drvdata(dev);
@@ -272,7 +271,7 @@ static int qoriq_tmu_suspend(struct device *dev)
        return 0;
 }
 
-static int qoriq_tmu_resume(struct device *dev)
+static int __maybe_unused qoriq_tmu_resume(struct device *dev)
 {
        u32 tmr;
        int ret;
@@ -289,7 +288,6 @@ static int qoriq_tmu_resume(struct device *dev)
 
        return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(qoriq_tmu_pm_ops,
                         qoriq_tmu_suspend, qoriq_tmu_resume);