summaryrefslogtreecommitdiff
path: root/include/linux/remoteproc.h
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2020-04-17 20:00:37 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2020-04-21 05:54:29 +0300
commit305ac5a766b1d0dd8a4052c8c92e5464888eaa10 (patch)
tree7b1e40c4ce498b6c4705e44f17c2d9a33e77ebb5 /include/linux/remoteproc.h
parentdb65527836156fe9c6abe6b9b4aa02fac49a67e3 (diff)
downloadlinux-305ac5a766b1d0dd8a4052c8c92e5464888eaa10.tar.xz
remoteproc: Add device-managed variants of rproc_alloc/rproc_add
Add API functions devm_rproc_alloc() and devm_rproc_add(), which behave like rproc_alloc() and rproc_add() respectively, but register their respective cleanup function to be called on driver detach. Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20200417170040.174319-2-paul@crapouillou.net Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r--include/linux/remoteproc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index 800b4f09dc98..ac4082f12e8b 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -600,6 +600,11 @@ int rproc_add(struct rproc *rproc);
int rproc_del(struct rproc *rproc);
void rproc_free(struct rproc *rproc);
+struct rproc *devm_rproc_alloc(struct device *dev, const char *name,
+ const struct rproc_ops *ops,
+ const char *firmware, int len);
+int devm_rproc_add(struct device *dev, struct rproc *rproc);
+
void rproc_add_carveout(struct rproc *rproc, struct rproc_mem_entry *mem);
struct rproc_mem_entry *