[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251119-imx-dsp-2025-11-19-v4-3-adafd342d07b@nxp.com>
Date: Wed, 19 Nov 2025 12:21:48 +0800
From: "Peng Fan (OSS)" <peng.fan@....nxp.com>
To: 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>,
Frank Li <Frank.Li@....com>, Daniel Baluta <daniel.baluta@....com>,
Shengjiu Wang <shengjiu.wang@....com>,
Iuliana Prodan <iuliana.prodan@....com>
Cc: linux-remoteproc@...r.kernel.org, imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Peng Fan <peng.fan@....com>
Subject: [PATCH v4 03/12] remoteproc: imx_dsp_rproc: Use
devm_pm_runtime_enable() helper
From: Peng Fan <peng.fan@....com>
Current code on the cleanup path just disables runtime PM for a device.
Using resource managed version devm_pm_runtime_enable() registers a cleanup
callback that sets autosuspend to false and then disables runtime PM for
a device. So, basically the same functionality as we don't use autosuspend
anyway.
As a result, the .remove callback is no longer needed, reducing boilerplate
code.
Reviewed-by: Frank Li <Frank.Li@....com>
Reviewed-by: Daniel Baluta <daniel.baluta@....com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@....com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@....com>
Tested-by: Iuliana Prodan <iuliana.prodan@....com>
Signed-off-by: Peng Fan <peng.fan@....com>
---
drivers/remoteproc/imx_dsp_rproc.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
index 418bd3ac70a4aa294b89c5d646a89e4da5ad2c35..f5d0aec52c56664d6074272e276edb0c4175c9ea 100644
--- a/drivers/remoteproc/imx_dsp_rproc.c
+++ b/drivers/remoteproc/imx_dsp_rproc.c
@@ -1200,14 +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)
-{
- pm_runtime_disable(&pdev->dev);
+ return devm_pm_runtime_enable(dev);
}
/* pm runtime functions */
@@ -1358,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