@@ -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);
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(-)