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>
This commit is contained in:

committed by
Bjorn Andersson

parent
db65527836
commit
305ac5a766
@@ -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 *
|
||||
|
Reference in New Issue
Block a user