drmm_of_get_bridge() is deprecated, switch to of_drm_get_bridge_by_endpoint(). As of_drm_get_bridge_by_endpoint() returns a refcounted bridge, ensure it is put by using bridge.next_bridge.
drm_panel.h becomes unused, drop the include. Signed-off-by: Luca Ceresoli <[email protected]> --- drivers/gpu/drm/vc4/vc4_dsi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c index 0148f2befed1..30598738cfcf 100644 --- a/drivers/gpu/drm/vc4/vc4_dsi.c +++ b/drivers/gpu/drm/vc4/vc4_dsi.c @@ -35,7 +35,6 @@ #include <drm/drm_edid.h> #include <drm/drm_mipi_dsi.h> #include <drm/drm_of.h> -#include <drm/drm_panel.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> #include <drm/drm_simple_kms_helper.h> @@ -555,7 +554,6 @@ struct vc4_dsi { struct platform_device *pdev; - struct drm_bridge *out_bridge; struct drm_bridge bridge; void __iomem *regs; @@ -1165,7 +1163,7 @@ static int vc4_dsi_bridge_attach(struct drm_bridge *bridge, struct vc4_dsi *dsi = bridge_to_vc4_dsi(bridge); /* Attach the panel or bridge to the dsi bridge */ - return drm_bridge_attach(encoder, dsi->out_bridge, + return drm_bridge_attach(encoder, dsi->bridge.next_bridge, &dsi->bridge, flags); } @@ -1749,9 +1747,9 @@ static int vc4_dsi_bind(struct device *dev, struct device *master, void *data) return ret; } - dsi->out_bridge = drmm_of_get_bridge(drm, dev->of_node, 0, 0); - if (IS_ERR(dsi->out_bridge)) - return PTR_ERR(dsi->out_bridge); + dsi->bridge.next_bridge = of_drm_get_bridge_by_endpoint(dev->of_node, 0, 0); + if (IS_ERR(dsi->bridge.next_bridge)) + return PTR_ERR(dsi->bridge.next_bridge); /* The esc clock rate is supposed to always be 100Mhz. */ ret = clk_set_rate(dsi->escape_clock, 100 * 1000000); -- 2.55.0
