author | Suman Anna <s-anna@ti.com> | |
Tue, 4 Aug 2020 20:05:00 +0000 (15:05 -0500) | ||
committer | Suman Anna <s-anna@ti.com> | |
Tue, 4 Aug 2020 22:08:47 +0000 (17:08 -0500) | ||
commit | f578559e0d0cc1f1f0573e15dfd5ea2bf3a897d1 | |
tree | 9c711fd3bd71440c24451fd4ea0fceacafa777a2 | tree | snapshot (tar.xz tar.gz zip) |
parent | 18f60ed60047260d476d600ba3732bdc0e04d9e8 | commit | diff |
remoteproc/k3-r5: Use devres functions to simplify cleanup
The K3 R5F remoteproc driver currently uses a mixture of devres and
regular functions, and unwinds all the previously acquired resources
manually upon any failures in cleanup paths, some even using the
devres cleanup functions themselves. Simplify these failure path
code cleanups by updating the driver to use more devres functions.
A lot of the code has been cleaned up courtesy of using
devm_add_action_or_reset() in the driver probe function for the
cluster-level cleanup, and devres_open_group() & devres_release_group()
functions for the core-level cleanups, and using any available
equivalent devres functions for regular functions.
Signed-off-by: Suman Anna <s-anna@ti.com>
The K3 R5F remoteproc driver currently uses a mixture of devres and
regular functions, and unwinds all the previously acquired resources
manually upon any failures in cleanup paths, some even using the
devres cleanup functions themselves. Simplify these failure path
code cleanups by updating the driver to use more devres functions.
A lot of the code has been cleaned up courtesy of using
devm_add_action_or_reset() in the driver probe function for the
cluster-level cleanup, and devres_open_group() & devres_release_group()
functions for the core-level cleanups, and using any available
equivalent devres functions for regular functions.
Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/remoteproc/ti_k3_r5_remoteproc.c | diff | blob | history |