[PATCH v1 5/5] drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach

Svyatoslav Ryhel posted 5 patches 1 month, 2 weeks ago
[PATCH v1 5/5] drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach
Posted by Svyatoslav Ryhel 1 month, 2 weeks ago
Switch to device managed version of mipi_dsi_attach.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpu/drm/panel/panel-renesas-r61307.c | 7 +------
 drivers/gpu/drm/panel/panel-renesas-r69328.c | 7 +------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
index 70bda074dd0d..d8185cc1b5d6 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
@@ -261,7 +261,7 @@ static int renesas_r61307_probe(struct mipi_dsi_device *dsi)
 
 	drm_panel_add(&priv->panel);
 
-	ret = mipi_dsi_attach(dsi);
+	ret = devm_mipi_dsi_attach(dev, dsi);
 	if (ret) {
 		drm_panel_remove(&priv->panel);
 		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
@@ -273,11 +273,6 @@ static int renesas_r61307_probe(struct mipi_dsi_device *dsi)
 static void renesas_r61307_remove(struct mipi_dsi_device *dsi)
 {
 	struct renesas_r61307 *priv = mipi_dsi_get_drvdata(dsi);
-	int ret;
-
-	ret = mipi_dsi_detach(dsi);
-	if (ret)
-		dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
 
 	drm_panel_remove(&priv->panel);
 }
diff --git a/drivers/gpu/drm/panel/panel-renesas-r69328.c b/drivers/gpu/drm/panel/panel-renesas-r69328.c
index 0ed143f77e50..bfe2787f8f53 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r69328.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r69328.c
@@ -217,7 +217,7 @@ static int renesas_r69328_probe(struct mipi_dsi_device *dsi)
 
 	drm_panel_add(&priv->panel);
 
-	ret = mipi_dsi_attach(dsi);
+	ret = devm_mipi_dsi_attach(dev, dsi);
 	if (ret) {
 		drm_panel_remove(&priv->panel);
 		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
@@ -229,11 +229,6 @@ static int renesas_r69328_probe(struct mipi_dsi_device *dsi)
 static void renesas_r69328_remove(struct mipi_dsi_device *dsi)
 {
 	struct renesas_r69328 *priv = mipi_dsi_get_drvdata(dsi);
-	int ret;
-
-	ret = mipi_dsi_detach(dsi);
-	if (ret)
-		dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
 
 	drm_panel_remove(&priv->panel);
 }
-- 
2.51.0
Re: [PATCH v1 5/5] drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach
Posted by Neil Armstrong 1 month, 2 weeks ago
On 2/15/26 09:51, Svyatoslav Ryhel wrote:
> Switch to device managed version of mipi_dsi_attach.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>   drivers/gpu/drm/panel/panel-renesas-r61307.c | 7 +------
>   drivers/gpu/drm/panel/panel-renesas-r69328.c | 7 +------
>   2 files changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> index 70bda074dd0d..d8185cc1b5d6 100644
> --- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
> +++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> @@ -261,7 +261,7 @@ static int renesas_r61307_probe(struct mipi_dsi_device *dsi)
>   
>   	drm_panel_add(&priv->panel);
>   
> -	ret = mipi_dsi_attach(dsi);
> +	ret = devm_mipi_dsi_attach(dev, dsi);
>   	if (ret) {
>   		drm_panel_remove(&priv->panel);
>   		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
> @@ -273,11 +273,6 @@ static int renesas_r61307_probe(struct mipi_dsi_device *dsi)
>   static void renesas_r61307_remove(struct mipi_dsi_device *dsi)
>   {
>   	struct renesas_r61307 *priv = mipi_dsi_get_drvdata(dsi);
> -	int ret;
> -
> -	ret = mipi_dsi_detach(dsi);
> -	if (ret)
> -		dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
>   
>   	drm_panel_remove(&priv->panel);
>   }
> diff --git a/drivers/gpu/drm/panel/panel-renesas-r69328.c b/drivers/gpu/drm/panel/panel-renesas-r69328.c
> index 0ed143f77e50..bfe2787f8f53 100644
> --- a/drivers/gpu/drm/panel/panel-renesas-r69328.c
> +++ b/drivers/gpu/drm/panel/panel-renesas-r69328.c
> @@ -217,7 +217,7 @@ static int renesas_r69328_probe(struct mipi_dsi_device *dsi)
>   
>   	drm_panel_add(&priv->panel);
>   
> -	ret = mipi_dsi_attach(dsi);
> +	ret = devm_mipi_dsi_attach(dev, dsi);
>   	if (ret) {
>   		drm_panel_remove(&priv->panel);
>   		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
> @@ -229,11 +229,6 @@ static int renesas_r69328_probe(struct mipi_dsi_device *dsi)
>   static void renesas_r69328_remove(struct mipi_dsi_device *dsi)
>   {
>   	struct renesas_r69328 *priv = mipi_dsi_get_drvdata(dsi);
> -	int ret;
> -
> -	ret = mipi_dsi_detach(dsi);
> -	if (ret)
> -		dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
>   
>   	drm_panel_remove(&priv->panel);
>   }


Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil