]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup
authorPeng Fan <peng.fan@nxp.com>
Fri, 26 Sep 2025 12:33:19 +0000 (20:33 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 14 Oct 2025 15:13:36 +0000 (09:13 -0600)
commit9b2451658afa9d144706f4b8d8727bb458fb4514
tree8acb56e26792b6fbd4aedca0b4c9a61a8a8d5203
parent65af722aa86fc58431670b3d95be9e1d9a0b060f
remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup

Replace the explicit call to imx_rproc_put_scu() in the remove path with
devm_add_action_or_reset(). Ensure proper cleanup of scu resources and
simplify the code by leveraging the device-managed resource framework.

Additionally:
 - Remove the IMX_RPROC_SCU_API check from imx_rproc_put_scu(), as
   devm_add_action_or_reset() now exclusively handles SCU cleanup.
 - Improve error reporting by using dev_err_probe() for consistency and
   clarity.
 - Drop the err_put_scu label, as it is now redundant due to the updated
   error handling approach.

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-5-4c0ec279cc5f@nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/imx_rproc.c