All of lore.kernel.org
 help / color / mirror / Atom feed
From: Osama Abdelkader <osama.abdelkader@gmail.com>
To: luca.ceresoli@bootlin.com,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] drm/bridge: tc358762: use devm for bridge registration and DSI attach
Date: Mon, 6 Jul 2026 14:59:17 +0200	[thread overview]
Message-ID: <akumpZf2lTIbOZj4@osama> (raw)
In-Reply-To: <20260521215228.188615-1-osama.abdelkader@gmail.com>

On Thu, May 21, 2026 at 11:52:26PM +0200, Osama Abdelkader wrote:
> Replace manual drm_bridge_remove()/mipi_dsi_detach() in remove with
> devm_drm_bridge_add() and devm_mipi_dsi_attach() in probe. Also check
> the return value from bridge registration.
> 
> Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
> ---
>  drivers/gpu/drm/bridge/tc358762.c | 19 +++++--------------
>  1 file changed, 5 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/tc358762.c b/drivers/gpu/drm/bridge/tc358762.c
> index 3d75d9cfa45e..3a021ca895f1 100644
> --- a/drivers/gpu/drm/bridge/tc358762.c
> +++ b/drivers/gpu/drm/bridge/tc358762.c
> @@ -293,25 +293,17 @@ static int tc358762_probe(struct mipi_dsi_device *dsi)
>  	ctx->bridge.of_node = dev->of_node;
>  	ctx->bridge.pre_enable_prev_first = true;
>  
> -	drm_bridge_add(&ctx->bridge);
> +	ret = devm_drm_bridge_add(dev, &ctx->bridge);
> +	if (ret < 0)
> +		return ret;
>  
> -	ret = mipi_dsi_attach(dsi);
> -	if (ret < 0) {
> -		drm_bridge_remove(&ctx->bridge);
> +	ret = devm_mipi_dsi_attach(dev, dsi);
> +	if (ret < 0)
>  		dev_err(dev, "failed to attach dsi\n");
> -	}
>  
>  	return ret;
>  }
>  
> -static void tc358762_remove(struct mipi_dsi_device *dsi)
> -{
> -	struct tc358762 *ctx = mipi_dsi_get_drvdata(dsi);
> -
> -	mipi_dsi_detach(dsi);
> -	drm_bridge_remove(&ctx->bridge);
> -}
> -
>  static const struct of_device_id tc358762_of_match[] = {
>  	{ .compatible = "toshiba,tc358762" },
>  	{ }
> @@ -320,7 +312,6 @@ MODULE_DEVICE_TABLE(of, tc358762_of_match);
>  
>  static struct mipi_dsi_driver tc358762_driver = {
>  	.probe = tc358762_probe,
> -	.remove = tc358762_remove,
>  	.driver = {
>  		.name = "tc358762",
>  		.of_match_table = tc358762_of_match,
> -- 
> 2.43.0
> 

ping.

      parent reply	other threads:[~2026-07-06 12:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 21:52 [PATCH 1/2] drm/bridge: tc358762: use devm for bridge registration and DSI attach Osama Abdelkader
2026-05-21 21:52 ` [PATCH 2/2] drm/bridge: tc358764: " Osama Abdelkader
2026-07-06 12:59 ` Osama Abdelkader [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=akumpZf2lTIbOZj4@osama \
    --to=osama.abdelkader@gmail.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.