]> git.dujemihanovic.xyz Git - linux.git/commitdiff
vc4: fix build failure in vc4_dsi_dev_probe()
authorArnd Bergmann <arnd@arndb.de>
Tue, 17 Jan 2023 16:52:51 +0000 (17:52 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 19 Jan 2023 08:16:04 +0000 (09:16 +0100)
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>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20230117165258.1979922-1-arnd@kernel.org
drivers/gpu/drm/vc4/vc4_dsi.c

index 2a71321b922213437ac40492e08db82366276161..a5c075f802e42e91cce86441c719c35ed4a96e5f 100644 (file)
@@ -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;