From: Bjorn Andersson Date: Mon, 28 Aug 2017 05:31:42 +0000 (-0700) Subject: remoteproc: Stop subdevices in reverse order X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f9cbbd256ccebc5911cb163f1cbb59fefd173d9a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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); }