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

[media] media: mtk-mdp: mark PM functions as __maybe_unused

A previous patch tried to fix a build error, but introduced another
warning:

drivers/media/platform/mtk-mdp/mtk_mdp_core.c:71:13: error: ‘mtk_mdp_clock_off’ defined but not used [-Werror=unused-function]
drivers/media/platform/mtk-mdp/mtk_mdp_core.c:62:13: error: ‘mtk_mdp_clock_on’ defined but not used [-Werror=unused-function]

This marks all the PM functions as __maybe_unused and removes
the #ifdef around them, as that will always do the right thing.

Fixes: 1b06fcf5 ("[media] media: mtk-mdp: fix build error")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent f2709c20
...@@ -234,8 +234,7 @@ static int mtk_mdp_remove(struct platform_device *pdev) ...@@ -234,8 +234,7 @@ static int mtk_mdp_remove(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_PM static int __maybe_unused mtk_mdp_pm_suspend(struct device *dev)
static int mtk_mdp_pm_suspend(struct device *dev)
{ {
struct mtk_mdp_dev *mdp = dev_get_drvdata(dev); struct mtk_mdp_dev *mdp = dev_get_drvdata(dev);
...@@ -244,7 +243,7 @@ static int mtk_mdp_pm_suspend(struct device *dev) ...@@ -244,7 +243,7 @@ static int mtk_mdp_pm_suspend(struct device *dev)
return 0; return 0;
} }
static int mtk_mdp_pm_resume(struct device *dev) static int __maybe_unused mtk_mdp_pm_resume(struct device *dev)
{ {
struct mtk_mdp_dev *mdp = dev_get_drvdata(dev); struct mtk_mdp_dev *mdp = dev_get_drvdata(dev);
...@@ -252,10 +251,8 @@ static int mtk_mdp_pm_resume(struct device *dev) ...@@ -252,10 +251,8 @@ static int mtk_mdp_pm_resume(struct device *dev)
return 0; return 0;
} }
#endif /* CONFIG_PM */
#ifdef CONFIG_PM_SLEEP static int __maybe_unused mtk_mdp_suspend(struct device *dev)
static int mtk_mdp_suspend(struct device *dev)
{ {
if (pm_runtime_suspended(dev)) if (pm_runtime_suspended(dev))
return 0; return 0;
...@@ -263,14 +260,13 @@ static int mtk_mdp_suspend(struct device *dev) ...@@ -263,14 +260,13 @@ static int mtk_mdp_suspend(struct device *dev)
return mtk_mdp_pm_suspend(dev); return mtk_mdp_pm_suspend(dev);
} }
static int mtk_mdp_resume(struct device *dev) static int __maybe_unused mtk_mdp_resume(struct device *dev)
{ {
if (pm_runtime_suspended(dev)) if (pm_runtime_suspended(dev))
return 0; return 0;
return mtk_mdp_pm_resume(dev); return mtk_mdp_pm_resume(dev);
} }
#endif /* CONFIG_PM_SLEEP */
static const struct dev_pm_ops mtk_mdp_pm_ops = { static const struct dev_pm_ops mtk_mdp_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(mtk_mdp_suspend, mtk_mdp_resume) SET_SYSTEM_SLEEP_PM_OPS(mtk_mdp_suspend, mtk_mdp_resume)
......
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