[PATCH v2 7/7] drm: renesas: shmobile: stop using deprecated devm_drm_of_get_bridge()

Paul Cercueil paul.cercueil at bootlin.com
Thu Oct 1 02:00:53 PDT 2026


Hi Luca,

Le mardi 29 septembre 2026 à 15:39 +0200, Luca Ceresoli a écrit :
> devm_drm_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.
> 
> drm_panel.h becomes unused, drop the include.
> 
> Acked-by: Maxime Ripard <mripard at kernel.org>
> Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>

Reviewed-by: Paul Cercueil <paul.cercueil at bootlin.com>

Cheers,
-Paul

> ---
>  drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
> b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
> index 328a36215e39..51bae2008cc6 100644
> --- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
> +++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
> @@ -28,7 +28,6 @@
>  #include <drm/drm_gem_dma_helper.h>
>  #include <drm/drm_modeset_helper.h>
>  #include <drm/drm_modeset_helper_vtables.h>
> -#include <drm/drm_panel.h>
>  #include <drm/drm_probe_helper.h>
>  #include <drm/drm_vblank.h>
>  
> @@ -447,7 +446,6 @@ static const struct drm_encoder_funcs shmob_encoder_funcs
> = {
>  int shmob_drm_encoder_create(struct shmob_drm_device *sdev)
>  {
>  	struct drm_encoder *encoder = &sdev->encoder;
> -	struct drm_bridge *bridge;
>  	int ret;
>  
>  	encoder->possible_crtcs = 1;
> @@ -463,7 +461,8 @@ int shmob_drm_encoder_create(struct shmob_drm_device
> *sdev)
>  	}
>  
>  	/* Create a panel bridge */
> -	bridge = devm_drm_of_get_bridge(sdev->dev, sdev->dev->of_node, 0, 0);
> +	struct drm_bridge *bridge __free(drm_bridge_put) =
> +		of_drm_get_bridge_by_endpoint(sdev->dev->of_node, 0, 0);
>  	if (IS_ERR(bridge))
>  		return PTR_ERR(bridge);
>  



More information about the linux-arm-kernel mailing list