[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220221074224.12920-1-jose.exposito89@gmail.com>
Date: Mon, 21 Feb 2022 08:42:24 +0100
From: José Expósito <jose.exposito89@...il.com>
To: jagan@...rulasolutions.com
Cc: andrzej.hajda@...el.com, narmstrong@...libre.com,
robert.foss@...aro.org, Laurent.pinchart@...asonboard.com,
jonas@...boo.se, jernej.skrabec@...il.com, airlied@...ux.ie,
daniel@...ll.ch, lgirdwood@...il.com, broonie@...nel.org,
maxime@...no.tech, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
José Expósito <jose.exposito89@...il.com>
Subject: [PATCH] drm/bridge: chipone-icn6211: switch to devm_drm_of_get_bridge
The function "drm_of_find_panel_or_bridge" has been deprecated in
favor of "devm_drm_of_get_bridge".
Switch to the new function and reduce boilerplate.
Signed-off-by: José Expósito <jose.exposito89@...il.com>
---
drivers/gpu/drm/bridge/chipone-icn6211.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/bridge/chipone-icn6211.c b/drivers/gpu/drm/bridge/chipone-icn6211.c
index a6151db95586..23c34039ac48 100644
--- a/drivers/gpu/drm/bridge/chipone-icn6211.c
+++ b/drivers/gpu/drm/bridge/chipone-icn6211.c
@@ -178,7 +178,6 @@ static const struct drm_bridge_funcs chipone_bridge_funcs = {
static int chipone_parse_dt(struct chipone *icn)
{
struct device *dev = icn->dev;
- struct drm_panel *panel;
int ret;
icn->vdd1 = devm_regulator_get_optional(dev, "vdd1");
@@ -214,11 +213,7 @@ static int chipone_parse_dt(struct chipone *icn)
return PTR_ERR(icn->enable_gpio);
}
- ret = drm_of_find_panel_or_bridge(dev->of_node, 1, 0, &panel, NULL);
- if (ret)
- return ret;
-
- icn->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
+ icn->panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0);
if (IS_ERR(icn->panel_bridge))
return PTR_ERR(icn->panel_bridge);
--
2.25.1
Powered by blists - more mailing lists