[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+V-a8uxOuf-9_3TLhFkz0TxNk50fmieJcGOCyxOFY3Mzedy2g@mail.gmail.com>
Date: Sun, 23 Feb 2025 21:13:11 +0000
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To: Tommaso Merciai <tommaso.merciai.xr@...renesas.com>
Cc: tomm.merciai@...il.com, linux-renesas-soc@...r.kernel.org,
linux-media@...r.kernel.org, biju.das.jz@...renesas.com,
prabhakar.mahadev-lad.rj@...renesas.com,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>, Magnus Damm <magnus.damm@...il.com>,
Hans Verkuil <hverkuil@...all.nl>, Uwe Kleine-König <u.kleine-koenig@...libre.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 05/18] media: rzg2l-cru: csi2: Use devm_pm_runtime_enable()
On Fri, Feb 21, 2025 at 4:05 PM Tommaso Merciai
<tommaso.merciai.xr@...renesas.com> wrote:
>
> Use newly added devm_pm_runtime_enable() into rzg2l_csi2_probe() and
> drop error path accordingly. Drop also unnecessary pm_runtime_disable()
> from rzg2l_csi2_remove().
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>
> Reviewed-by: Biju Das <biju.das.jz@...renesas.com>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@...renesas.com>
> ---
> Changes since v1:
> - Collected tags
>
> drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Cheers,
Prabhakar
> diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> index 948f1917b830..4ccf7c5ea58b 100644
> --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
> @@ -805,11 +805,13 @@ static int rzg2l_csi2_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> - pm_runtime_enable(dev);
> + ret = devm_pm_runtime_enable(dev);
> + if (ret)
> + return ret;
>
> ret = rzg2l_validate_csi2_lanes(csi2);
> if (ret)
> - goto error_pm;
> + return ret;
>
> csi2->subdev.dev = dev;
> v4l2_subdev_init(&csi2->subdev, &rzg2l_csi2_subdev_ops);
> @@ -834,7 +836,7 @@ static int rzg2l_csi2_probe(struct platform_device *pdev)
> ret = media_entity_pads_init(&csi2->subdev.entity, ARRAY_SIZE(csi2->pads),
> csi2->pads);
> if (ret)
> - goto error_pm;
> + return ret;
>
> ret = v4l2_subdev_init_finalize(&csi2->subdev);
> if (ret < 0)
> @@ -852,8 +854,6 @@ static int rzg2l_csi2_probe(struct platform_device *pdev)
> v4l2_async_nf_unregister(&csi2->notifier);
> v4l2_async_nf_cleanup(&csi2->notifier);
> media_entity_cleanup(&csi2->subdev.entity);
> -error_pm:
> - pm_runtime_disable(dev);
>
> return ret;
> }
> @@ -867,7 +867,6 @@ static void rzg2l_csi2_remove(struct platform_device *pdev)
> v4l2_async_unregister_subdev(&csi2->subdev);
> v4l2_subdev_cleanup(&csi2->subdev);
> media_entity_cleanup(&csi2->subdev.entity);
> - pm_runtime_disable(&pdev->dev);
> }
>
> static int rzg2l_csi2_pm_runtime_suspend(struct device *dev)
> --
> 2.34.1
>
>
Powered by blists - more mailing lists