diff options
| author | Peng Fan <peng.fan@nxp.com> | 2025-09-26 20:33:20 +0800 |
|---|---|---|
| committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2025-10-14 09:14:32 -0600 |
| commit | ff7c763b91981b9037086eae4ae4f127d5cceb63 (patch) | |
| tree | d0b509ba93ef17c55f9b8119db48194931ea0ef5 /drivers/remoteproc | |
| parent | 9b2451658afa9d144706f4b8d8727bb458fb4514 (diff) | |
remoteproc: imx_rproc: Use devm_rproc_add() helper
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.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20250926-imx_rproc_v3-v3-6-4c0ec279cc5f@nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
| -rw-r--r-- | drivers/remoteproc/imx_rproc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 76feda868cb6..68e01b647b66 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -1135,7 +1135,7 @@ static int imx_rproc_probe(struct platform_device *pdev) return dev_err_probe(dev, ret, "pm_runtime get failed\n"); } - ret = rproc_add(rproc); + ret = devm_rproc_add(dev, rproc); if (ret) { dev_err(dev, "rproc_add failed\n"); goto err_put_pm; @@ -1161,7 +1161,6 @@ static void imx_rproc_remove(struct platform_device *pdev) pm_runtime_disable(priv->dev); pm_runtime_put_noidle(priv->dev); } - rproc_del(rproc); } static const struct imx_rproc_plat_ops imx_rproc_ops_arm_smc = { |
