Skip to content

Commit

Permalink
drm/bridge: chipone-icn6211: switch to devm_drm_of_get_bridge
Browse files Browse the repository at this point in the history
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@gmail.com>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220221074224.12920-1-jose.exposito89@gmail.com
  • Loading branch information
José Expósito authored and Robert Foss committed Mar 1, 2022
1 parent beac770 commit c803ae6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/gpu/drm/bridge/chipone-icn6211.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,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");
Expand Down Expand Up @@ -227,11 +226,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);

Expand Down

0 comments on commit c803ae6

Please sign in to comment.