public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vc4: fix build failure in vc4_dsi_dev_probe()
@ 2023-01-17 16:52 Arnd Bergmann
  2023-01-17 17:06 ` (subset) " Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-01-17 16:52 UTC (permalink / raw)
  To: Emma Anholt, Maxime Ripard
  Cc: Arnd Bergmann, David Airlie, Daniel Vetter, Dave Stevenson,
	Thomas Zimmermann, Maíra Canal, Javier Martinez Canillas,
	dri-devel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The bridge->of_node field is defined inside of an #ifdef, which
results in a build failure when compile-testing the vc4_dsi driver
without CONFIG_OF:

drivers/gpu/drm/vc4/vc4_dsi.c: In function 'vc4_dsi_dev_probe':
drivers/gpu/drm/vc4/vc4_dsi.c:1822:20: error: 'struct drm_bridge' has no member named 'of_node'
 1822 |         dsi->bridge.of_node = dev->of_node;

Add another #ifdef in the place it is used in. Alternatively we
could consider dropping the #ifdef in the struct definition
and all other users.

Fixes: 78df640394cd ("drm/vc4: dsi: Convert to using a bridge instead of encoder")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/vc4/vc4_dsi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c
index 2a71321b9222..a5c075f802e4 100644
--- a/drivers/gpu/drm/vc4/vc4_dsi.c
+++ b/drivers/gpu/drm/vc4/vc4_dsi.c
@@ -1819,7 +1819,9 @@ static int vc4_dsi_dev_probe(struct platform_device *pdev)
 
 	dsi->pdev = pdev;
 	dsi->bridge.funcs = &vc4_dsi_bridge_funcs;
+#ifdef CONFIG_OF
 	dsi->bridge.of_node = dev->of_node;
+#endif
 	dsi->bridge.type = DRM_MODE_CONNECTOR_DSI;
 	dsi->dsi_host.ops = &vc4_dsi_host_ops;
 	dsi->dsi_host.dev = dev;
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: (subset) [PATCH] vc4: fix build failure in vc4_dsi_dev_probe()
  2023-01-17 16:52 [PATCH] vc4: fix build failure in vc4_dsi_dev_probe() Arnd Bergmann
@ 2023-01-17 17:06 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2023-01-17 17:06 UTC (permalink / raw)
  To: Emma Anholt, Maxime Ripard, Arnd Bergmann
  Cc: Arnd Bergmann, David Airlie, Daniel Vetter, Dave Stevenson,
	Thomas Zimmermann, Maíra Canal, Javier Martinez Canillas,
	dri-devel, linux-kernel

On Tue, 17 Jan 2023 17:52:51 +0100, Arnd Bergmann wrote:
> The bridge->of_node field is defined inside of an #ifdef, which
> results in a build failure when compile-testing the vc4_dsi driver
> without CONFIG_OF:
> 
> drivers/gpu/drm/vc4/vc4_dsi.c: In function 'vc4_dsi_dev_probe':
> drivers/gpu/drm/vc4/vc4_dsi.c:1822:20: error: 'struct drm_bridge' has no member named 'of_node'
>  1822 |         dsi->bridge.of_node = dev->of_node;
> 
> [...]

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-17 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 16:52 [PATCH] vc4: fix build failure in vc4_dsi_dev_probe() Arnd Bergmann
2023-01-17 17:06 ` (subset) " Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox