diff mbox series

drm/rockchip: cdn-dp-core: Pass __maybe_unused for the suspend()/resume() hooks

Message ID 20200821143429.13083-1-festevam@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm/rockchip: cdn-dp-core: Pass __maybe_unused for the suspend()/resume() hooks | expand

Commit Message

Fabio Estevam Aug. 21, 2020, 2:34 p.m. UTC
When building using a riscv allmodconfig the following build warning is
seen:

drivers/gpu/drm/rockchip/cdn-dp-core.c:1124:12: warning: 'cdn_dp_resume' defined but not used [-Wunused-function]

Pass __maybe_unused for the suspend()/resume() hooks to fix the build
warning when a defconfig does not select CONFIG_PM_SLEEP.

Reported-by: Olof's autobuilder <build@lixom.net>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index a4a45daf93f2..18e4de116630 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -1107,7 +1107,7 @@  static const struct component_ops cdn_dp_component_ops = {
 	.unbind = cdn_dp_unbind,
 };
 
-static int cdn_dp_suspend(struct device *dev)
+static int __maybe_unused cdn_dp_suspend(struct device *dev)
 {
 	struct cdn_dp_device *dp = dev_get_drvdata(dev);
 	int ret = 0;
@@ -1121,7 +1121,7 @@  static int cdn_dp_suspend(struct device *dev)
 	return ret;
 }
 
-static int cdn_dp_resume(struct device *dev)
+static int __maybe_unused cdn_dp_resume(struct device *dev)
 {
 	struct cdn_dp_device *dp = dev_get_drvdata(dev);