Commit d1f08d82 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Rob Clark

drm/msm/mdp5: mark runtime_pm functions as __maybe_unused

When CONFIG_PM is disabled, we get harmless warnings about unused
functions:

drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c:1025:12: error: 'mdp5_runtime_resume' defined but not used [-Werror=unused-function]
 static int mdp5_runtime_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c:1015:12: error: 'mdp5_runtime_suspend' defined but not used [-Werror=unused-function]
 static int mdp5_runtime_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~

This marks both functions as __maybe_unused so the compiler
can drop them silently.

Fixes: d68fe15b ("drm/msm/mdp5: Use runtime PM get/put API instead of toggling clocks")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 6e05899d
...@@ -1012,7 +1012,7 @@ static int mdp5_dev_remove(struct platform_device *pdev) ...@@ -1012,7 +1012,7 @@ static int mdp5_dev_remove(struct platform_device *pdev)
return 0; return 0;
} }
static int mdp5_runtime_suspend(struct device *dev) static __maybe_unused int mdp5_runtime_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
struct mdp5_kms *mdp5_kms = platform_get_drvdata(pdev); struct mdp5_kms *mdp5_kms = platform_get_drvdata(pdev);
...@@ -1022,7 +1022,7 @@ static int mdp5_runtime_suspend(struct device *dev) ...@@ -1022,7 +1022,7 @@ static int mdp5_runtime_suspend(struct device *dev)
return mdp5_disable(mdp5_kms); return mdp5_disable(mdp5_kms);
} }
static int mdp5_runtime_resume(struct device *dev) static __maybe_unused int mdp5_runtime_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
struct mdp5_kms *mdp5_kms = platform_get_drvdata(pdev); struct mdp5_kms *mdp5_kms = platform_get_drvdata(pdev);
......
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