summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2022-05-24 04:05:16 +0300
committerMarek Vasut <marex@denx.de>2022-06-12 13:22:24 +0300
commit5c57cbc390b166950c2e6c2f0c4edaeb0f47e97d (patch)
tree1cf735bccd97d09f95d32afc15da777279e1509c /drivers/gpu/drm
parent1db4b5264819a8e3aa62e38287bf1da2e1dc8894 (diff)
downloadlinux-5c57cbc390b166950c2e6c2f0c4edaeb0f47e97d.tar.xz
drm/bridge: lt9211: Convert to drm_of_get_data_lanes_count
Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Marek Vasut <marex@denx.de> Cc: Andrzej Hajda <andrzej.hajda@intel.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Maxime Ripard <maxime@cerno.tech> Cc: Robert Foss <robert.foss@linaro.org> Cc: Sam Ravnborg <sam@ravnborg.org> To: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-5-marex@denx.de
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/bridge/lontium-lt9211.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/bridge/lontium-lt9211.c b/drivers/gpu/drm/bridge/lontium-lt9211.c
index e92821fbc639..84d764b4139b 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9211.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9211.c
@@ -686,7 +686,7 @@ static int lt9211_host_attach(struct lt9211 *ctx)
int ret;
endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1);
- dsi_lanes = of_property_count_u32_elems(endpoint, "data-lanes");
+ dsi_lanes = drm_of_get_data_lanes_count(endpoint, 1, 4);
host_node = of_graph_get_remote_port_parent(endpoint);
host = of_find_mipi_dsi_host_by_node(host_node);
of_node_put(host_node);
@@ -695,8 +695,8 @@ static int lt9211_host_attach(struct lt9211 *ctx)
if (!host)
return -EPROBE_DEFER;
- if (dsi_lanes < 0 || dsi_lanes > 4)
- return -EINVAL;
+ if (dsi_lanes < 0)
+ return dsi_lanes;
dsi = devm_mipi_dsi_device_register_full(dev, host, &info);
if (IS_ERR(dsi))