diff options
author | Sarangdhar Joshi <spjoshi@codeaurora.org> | 2017-01-23 17:48:48 -0800 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2017-01-30 14:18:40 -0800 |
commit | b003d45b37b2d2c682f279e6fd5a9254b8ddc244 (patch) | |
tree | 09bddf1c64e079476e674867a87d6fcce7cf0955 /drivers/remoteproc/remoteproc_core.c | |
parent | 90a068ed3fc93e088d8a216826e33b0c14edec59 (diff) | |
download | linux-b003d45b37b2d2c682f279e6fd5a9254b8ddc244.tar.bz2 |
remoteproc: Move rproc_delete_debug_dir() to rproc_del()
The "remoteproc{0,1...}" sysfs entries are added in
rproc_add() and deleted in rproc_type_release() instead of
in rproc_del(). That leaves these lingering entries sticking
around after we return from rproc_del(). Move the
rproc_delete_debug_dir() to rproc_del() to fix this.
Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/remoteproc_core.c')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 90b05c72186c..44f119a671fe 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1315,8 +1315,6 @@ static void rproc_type_release(struct device *dev) dev_info(&rproc->dev, "releasing %s\n", rproc->name); - rproc_delete_debug_dir(rproc); - idr_destroy(&rproc->notifyids); if (rproc->index >= 0) @@ -1491,6 +1489,8 @@ int rproc_del(struct rproc *rproc) if (rproc->auto_boot) rproc_shutdown(rproc); + rproc_delete_debug_dir(rproc); + /* the rproc is downref'ed as soon as it's removed from the klist */ mutex_lock(&rproc_list_mutex); list_del(&rproc->node); |