summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc/remoteproc_core.c
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2017-08-28 07:31:42 +0200
committerBjorn Andersson <bjorn.andersson@linaro.org>2017-08-31 01:29:55 +0200
commitf9cbbd256ccebc5911cb163f1cbb59fefd173d9a (patch)
treec07d366843b9ff02e58d2c8d90c83535b7d380ec /drivers/remoteproc/remoteproc_core.c
parentremoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver (diff)
downloadlinux-f9cbbd256ccebc5911cb163f1cbb59fefd173d9a.tar.xz
linux-f9cbbd256ccebc5911cb163f1cbb59fefd173d9a.zip
remoteproc: Stop subdevices in reverse order
Subdevices might depend on earlier registered subdevices for communication purposes, as such they should be stopped in reverse order so that said communication channel is removed after the dependent subdevice is stopped. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/remoteproc_core.c')
-rw-r--r--drivers/remoteproc/remoteproc_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 48b2c5ddfb4d..8072df1f0f94 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -794,7 +794,7 @@ static void rproc_remove_subdevices(struct rproc *rproc)
{
struct rproc_subdev *subdev;
- list_for_each_entry(subdev, &rproc->subdevs, node)
+ list_for_each_entry_reverse(subdev, &rproc->subdevs, node)
subdev->remove(subdev);
}