Skip to contentSkip to conversation

drm: bridge: dw-hdmi: fix building without CONFIG_OF

PATCH In review Arnd Bergmann 2 participants 2 messages Jan 23, 2017 – Jan 24, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: bridge: dw-hdmi: fix building without CONFIG_OF

The of_node member in struct drm_bridge is hidden when CONFIG_OF is disabled, causing a build error:

drivers/gpu/drm/bridge/dw-hdmi.c: In function '__dw_hdmi_probe':
drivers/gpu/drm/bridge/dw-hdmi.c:2063:14: error: 'struct drm_bridge' has no member named 'of_node'

We could fix this either using a Kconfig dependency on CONFIG_OF or making the one line conditional. The latter gives us better compile test coverage, so this is what I'm doing here.

Fixes 69497eb9234e ("drm: bridge: dw-hdmi: Implement DRM bridge registration")
---
 drivers/gpu/drm/bridge/dw-hdmi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/bridge/dw-hdmi.c +2 -0
index 4fda0717e789..9a9ec27d9e28 100644
@@ -2060,7 +2060,9 @@ __dw_hdmi_probe(struct platform_device *pdev,
 
 	hdmi->bridge.driver_private = hdmi;
 	hdmi->bridge.funcs = &dw_hdmi_bridge_funcs;
+#ifdef CONFIG_OF
 	hdmi->bridge.of_node = pdev->dev.of_node;
+#endif
 
 	ret = dw_hdmi_fb_registered(hdmi);
 	if (ret)
Signature · 1 line
2.9.0
#1 lore raw
Quoted 6 lines · Arnd Bergmann

The of_node member in struct drm_bridge is hidden when CONFIG_OF is disabled, causing a build error:

drivers/gpu/drm/bridge/dw-hdmi.c: In function '__dw_hdmi_probe':
drivers/gpu/drm/bridge/dw-hdmi.c:2063:14: error: 'struct drm_bridge' has no member named 'of_node'

Quoted 6 lines

We could fix this either using a Kconfig dependency on CONFIG_OF or making the one line conditional. The latter gives us better compile test coverage, so this is what I'm doing here.

Fixes 69497eb9234e ("drm: bridge: dw-hdmi: Implement DRM bridge registration")

Thanks for fixing this, queued to drm-misc.

Archit

Quoted 19 lines
---
 drivers/gpu/drm/bridge/dw-hdmi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/bridge/dw-hdmi.c +2 -0
index 4fda0717e789..9a9ec27d9e28 100644
@@ -2060,7 +2060,9 @@ __dw_hdmi_probe(struct platform_device *pdev,
 
 	hdmi->bridge.driver_private = hdmi;
 	hdmi->bridge.funcs = &dw_hdmi_bridge_funcs;
+#ifdef CONFIG_OF
 	hdmi->bridge.of_node = pdev->dev.of_node;
+#endif
 
 	ret = dw_hdmi_fb_registered(hdmi);
 	if (ret)
Signature · 6 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel