Skip to contentSkip to conversation

drm/rockchip: cdn-dp-core: fix function not used when not PM_SLEEP

PATCH Superseded Randy Dunlap 1 participant 1 message Dec 11, 2020

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/rockchip: cdn-dp-core: fix function not used when not PM_SLEEP

Fix build warning when CONFIG_PM_SLEEP is not enabled.

../drivers/gpu/drm/rockchip/cdn-dp-core.c:1124:12: warning: ‘cdn_dp_resume’ defined but not used [-Wunused-function]
static int cdn_dp_resume(struct device *dev)

Fixes 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static")
Cc Sandy Huang <[email protected]>
Cc Heiko Stübner <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/rockchip/cdn-dp-core.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/rockchip/cdn-dp-core.c +2 -0
@@ -1121,6 +1121,7 @@ static int cdn_dp_suspend(struct device
 	return ret;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int cdn_dp_resume(struct device *dev)
 {
 	struct cdn_dp_device *dp = dev_get_drvdata(dev);
@@ -1133,6 +1134,7 @@ static int cdn_dp_resume(struct device *
 
 	return 0;
 }
+#endif
 
 static int cdn_dp_probe(struct platform_device *pdev)
 {