[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMrH/ic5wc4cyHCs@lizhi-Precision-Tower-5810>
Date: Wed, 17 Sep 2025 10:38:54 -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>,
Ulf Hansson <ulf.hansson@...aro.org>,
Hiago De Franco <hiago.franco@...adex.com>,
linux-remoteproc@...r.kernel.org, imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] remoteproc: imx_rproc: Use devm_rproc_add() helper
On Wed, Sep 17, 2025 at 09:19:18PM +0800, Peng Fan wrote:
> Replace manual rproc_add() and cleanup logic with devm_rproc_add(), which
> ties the remoteproc lifecycle to the device's lifecycle. This simplifies
> error handling and ensures proper cleanup.
>
> With no need to invoke rproc_del(), the remove() ops could be removed.
>
> No functional changes.
>
> Signed-off-by: Peng Fan <peng.fan@....com>
> ---
Reviewed-by: Frank Li <Frank.Li@....com>
> drivers/remoteproc/imx_rproc.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index a53ff186d218f54123e1ce740b0277a6fe95a902..694fbbb2f34061de22a3a815f8a6114159585f9e 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -1149,20 +1149,13 @@ static int imx_rproc_probe(struct platform_device *pdev)
> return dev_err_probe(dev, ret, "Failed to add devm disable pm action\n");
> }
>
> - ret = rproc_add(rproc);
> + ret = devm_rproc_add(dev, rproc);
> if (ret)
> return dev_err_probe(dev, ret, "rproc_add failed\n");
>
> return 0;
> }
>
> -static void imx_rproc_remove(struct platform_device *pdev)
> -{
> - struct rproc *rproc = platform_get_drvdata(pdev);
> -
> - rproc_del(rproc);
> -}
> -
> static const struct imx_rproc_plat_ops imx_rproc_ops_arm_smc = {
> .start = imx_rproc_arm_smc_start,
> .stop = imx_rproc_arm_smc_stop,
> @@ -1288,7 +1281,6 @@ MODULE_DEVICE_TABLE(of, imx_rproc_of_match);
>
> static struct platform_driver imx_rproc_driver = {
> .probe = imx_rproc_probe,
> - .remove = imx_rproc_remove,
> .driver = {
> .name = "imx-rproc",
> .of_match_table = imx_rproc_of_match,
>
> --
> 2.37.1
>
Powered by blists - more mailing lists