Commit b003d45b authored by Sarangdhar Joshi's avatar Sarangdhar Joshi Committed by Bjorn Andersson

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: default avatarSarangdhar Joshi <spjoshi@codeaurora.org>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 90a068ed
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment