Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda <andrzej.hajda@xxxxxxxxx> Signed-off-by: Marek Vasut <marex@xxxxxxx> Cc: Andrzej Hajda <andrzej.hajda@xxxxxxxxx> Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> Cc: Lucas Stach <l.stach@xxxxxxxxxxxxxx> Cc: Maxime Ripard <maxime@xxxxxxxxxx> Cc: Robert Foss <robert.foss@xxxxxxxxxx> Cc: Sam Ravnborg <sam@xxxxxxxxxxxx> To: dri-devel@xxxxxxxxxxxxxxxxxxxxx --- V2: - Rename drm_of_get_data_lanes{,_ep} to drm_of_get_data_lanes_count{,_ep} - Add RB from Andrzej --- drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c index 891bb956fd61b..67dce337098a5 100644 --- a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c +++ b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c @@ -683,19 +683,10 @@ static int rcar_mipi_dsi_parse_dt(struct rcar_mipi_dsi *dsi) u32 data_lanes[4]; int ret; - ep = of_graph_get_endpoint_by_regs(dsi->dev->of_node, 1, 0); - if (!ep) { - dev_dbg(dsi->dev, "unconnected port@1\n"); - return -ENODEV; - } - - ret = of_property_read_variable_u32_array(ep, "data-lanes", data_lanes, - 1, 4); - of_node_put(ep); - + ret = drm_of_get_data_lanes_count_ep(dsi->dev->of_node, 1, 0, 1, 4); if (ret < 0) { dev_err(dsi->dev, "missing or invalid data-lanes property\n"); - return -ENODEV; + return ret; } dsi->num_data_lanes = ret; -- 2.35.1