media: venus: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Mon, 17 Jul 2017 08:56:47 +0000 (04:56 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 20 Jul 2017 19:51:50 +0000 (15:51 -0400)
Without PM support, gcc warns about two unused functions:

platform/qcom/venus/core.c:146:13: error: 'venus_clks_disable' defined but not used [-Werror=unused-function]
platform/qcom/venus/core.c:126:12: error: 'venus_clks_enable' defined but not used [-Werror=unused-function]

The problem as usual are incorrect #ifdefs, so the easiest fix
is to do away with the #ifdef completely and mark the suspend/resume
handlers as __maybe_unused, which they are.

Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/qcom/venus/core.c

index d8cbe8549d975d229606bef98ee8cc77bcdc9145..47f79637938c31b2632e671394f2051a61f18944 100644 (file)
@@ -270,8 +270,7 @@ static int venus_remove(struct platform_device *pdev)
        return ret;
 }
 
-#ifdef CONFIG_PM
-static int venus_runtime_suspend(struct device *dev)
+static __maybe_unused int venus_runtime_suspend(struct device *dev)
 {
        struct venus_core *core = dev_get_drvdata(dev);
        int ret;
@@ -283,7 +282,7 @@ static int venus_runtime_suspend(struct device *dev)
        return ret;
 }
 
-static int venus_runtime_resume(struct device *dev)
+static __maybe_unused int venus_runtime_resume(struct device *dev)
 {
        struct venus_core *core = dev_get_drvdata(dev);
        int ret;
@@ -302,7 +301,6 @@ err_clks_disable:
        venus_clks_disable(core);
        return ret;
 }
-#endif
 
 static const struct dev_pm_ops venus_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,