Commit eb918f91 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mauro Carvalho Chehab

media: venus: mark PM functions as __maybe_unused

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: af2c3834 ("[media] media: venus: adding core part and helper functions")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent fc1ff45a
...@@ -270,8 +270,7 @@ static int venus_remove(struct platform_device *pdev) ...@@ -270,8 +270,7 @@ static int venus_remove(struct platform_device *pdev)
return ret; return ret;
} }
#ifdef CONFIG_PM static __maybe_unused int venus_runtime_suspend(struct device *dev)
static int venus_runtime_suspend(struct device *dev)
{ {
struct venus_core *core = dev_get_drvdata(dev); struct venus_core *core = dev_get_drvdata(dev);
int ret; int ret;
...@@ -283,7 +282,7 @@ static int venus_runtime_suspend(struct device *dev) ...@@ -283,7 +282,7 @@ static int venus_runtime_suspend(struct device *dev)
return ret; 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); struct venus_core *core = dev_get_drvdata(dev);
int ret; int ret;
...@@ -302,7 +301,6 @@ static int venus_runtime_resume(struct device *dev) ...@@ -302,7 +301,6 @@ static int venus_runtime_resume(struct device *dev)
venus_clks_disable(core); venus_clks_disable(core);
return ret; return ret;
} }
#endif
static const struct dev_pm_ops venus_pm_ops = { static const struct dev_pm_ops venus_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment