Skip to content

Commit 481fc9e

Browse files
bijudasdianders
authored andcommitted
drm/bridge: Drop CONFIG_OF conditionals around of_node pointers
Having conditional around the of_node pointers turns out to make driver code use ugly #ifdef and #if blocks. So drop the conditionals. Suggested-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230831080938.47454-4-biju.das.jz@bp.renesas.com
1 parent d8dfccd commit 481fc9e

4 files changed

Lines changed: 0 additions & 8 deletions

File tree

drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,9 +1231,7 @@ static int anx78xx_i2c_probe(struct i2c_client *client)
12311231

12321232
mutex_init(&anx78xx->lock);
12331233

1234-
#if IS_ENABLED(CONFIG_OF)
12351234
anx78xx->bridge.of_node = client->dev.of_node;
1236-
#endif
12371235

12381236
anx78xx->client = client;
12391237
i2c_set_clientdata(client, anx78xx);

drivers/gpu/drm/bridge/panel.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,7 @@ struct drm_bridge *drm_panel_bridge_add_typed(struct drm_panel *panel,
318318
panel_bridge->panel = panel;
319319

320320
panel_bridge->bridge.funcs = &panel_bridge_bridge_funcs;
321-
#ifdef CONFIG_OF
322321
panel_bridge->bridge.of_node = panel->dev->of_node;
323-
#endif
324322
panel_bridge->bridge.ops = DRM_BRIDGE_OP_MODES;
325323
panel_bridge->bridge.type = connector_type;
326324

drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3541,9 +3541,7 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
35413541
| DRM_BRIDGE_OP_HPD;
35423542
hdmi->bridge.interlace_allowed = true;
35433543
hdmi->bridge.ddc = hdmi->ddc;
3544-
#ifdef CONFIG_OF
35453544
hdmi->bridge.of_node = pdev->dev.of_node;
3546-
#endif
35473545

35483546
memset(&pdevinfo, 0, sizeof(pdevinfo));
35493547
pdevinfo.parent = dev;

drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,9 +1182,7 @@ __dw_mipi_dsi_probe(struct platform_device *pdev,
11821182

11831183
dsi->bridge.driver_private = dsi;
11841184
dsi->bridge.funcs = &dw_mipi_dsi_bridge_funcs;
1185-
#ifdef CONFIG_OF
11861185
dsi->bridge.of_node = pdev->dev.of_node;
1187-
#endif
11881186

11891187
return dsi;
11901188
}

0 commit comments

Comments
 (0)