]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/bridge: adv7511: switch to of_drm_get_bridge_by_endpoint()
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Mon, 11 May 2026 16:40:12 +0000 (18:40 +0200)
committerLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 19 May 2026 08:57:26 +0000 (10:57 +0200)
commitf08eff4ad2873960d03a3834c04b86bfa4cfcdcb
treee2674c71180c0033bdff595a8d845ec055fed270
parentcd9517f6e2093a4579f8a37ca66214eb34e9cd04
drm/bridge: adv7511: switch to of_drm_get_bridge_by_endpoint()

This driver calls drm_of_find_panel_or_bridge() with a NULL pointer in the
@panel parameter, thus using a reduced feature set of that function.
Replace this call with the simpler of_drm_get_bridge_by_endpoint().

Since of_drm_get_bridge_by_endpoint() increases the refcount of the
returned bridge, ensure it is put on removal. To achieve this, instead of
adding an explicit drm_bridge_put(), migrate to the bridge::next_bridge
pointer which is automatically put when the bridge is eventually freed.

Tested-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://patch.msgid.link/20260511-drm-bridge-alloc-getput-panel_or_bridge-v6-8-f61c9e498b3f@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
drivers/gpu/drm/bridge/adv7511/adv7511.h
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c