[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQUEzx6sobI4Yes5@lizhi-Precision-Tower-5810>
Date: Fri, 31 Oct 2025 14:49:51 -0400
From: Frank Li <Frank.li@....com>
To: Peng Fan <peng.fan@....com>
Cc: Bjorn Andersson <andersson@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Shengjiu Wang <shengjiu.wang@....com>,
Daniel Baluta <daniel.baluta@....com>,
Iuliana Prodan <iuliana.prodan@....com>,
linux-remoteproc@...r.kernel.org, imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 03/11] remoteproc: imx_dsp_rproc: Use
devm_pm_runtime_enable() helper
On Fri, Oct 31, 2025 at 05:08:32PM +0800, Peng Fan wrote:
> Replace manual pm_runtime_enable() with devm_pm_runtime_enable() to
> leverage device-managed cleanup and simplify resource handling.
>
> pm_runtime_disable_action() not only calls pm_runtime_disable(), but
> also calls pm_runtime_dont_use_autosuspend(). The current driver
> only calls pm_runtime_disable(). But this should be fine here to use
> devm_pm_runtime_enable().
looks like this paragaph is reduntant.
Reviewed-by: Frank Li <Frank.Li@....com>
>
> As a result, the .remove callback is no longer needed, reducing boilerplate
> code.
>
> Signed-off-by: Peng Fan <peng.fan@....com>
> ---
> drivers/remoteproc/imx_dsp_rproc.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
> index df6a4126538d22ff6e02145edb5ac13c2d72c949..f5d0aec52c56664d6074272e276edb0c4175c9ea 100644
> --- a/drivers/remoteproc/imx_dsp_rproc.c
> +++ b/drivers/remoteproc/imx_dsp_rproc.c
> @@ -1200,17 +1200,7 @@ static int imx_dsp_rproc_probe(struct platform_device *pdev)
>
> rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_XTENSA);
>
> - pm_runtime_enable(dev);
> -
> - return 0;
> -}
> -
> -static void imx_dsp_rproc_remove(struct platform_device *pdev)
> -{
> - struct rproc *rproc = platform_get_drvdata(pdev);
> - struct imx_dsp_rproc *priv = rproc->priv;
> -
> - pm_runtime_disable(&pdev->dev);
> + return devm_pm_runtime_enable(dev);
> }
>
> /* pm runtime functions */
> @@ -1361,7 +1351,6 @@ MODULE_DEVICE_TABLE(of, imx_dsp_rproc_of_match);
>
> static struct platform_driver imx_dsp_rproc_driver = {
> .probe = imx_dsp_rproc_probe,
> - .remove = imx_dsp_rproc_remove,
> .driver = {
> .name = "imx-dsp-rproc",
> .of_match_table = imx_dsp_rproc_of_match,
>
> --
> 2.37.1
>
Powered by blists - more mailing lists