瀏覽代碼

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>
Bjorn Andersson 8 年之前
父節點
當前提交
f9cbbd256c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/remoteproc/remoteproc_core.c

+ 1 - 1
drivers/remoteproc/remoteproc_core.c

@@ -794,7 +794,7 @@ static void rproc_remove_subdevices(struct rproc *rproc)
 {
 {
 	struct rproc_subdev *subdev;
 	struct rproc_subdev *subdev;
 
 
-	list_for_each_entry(subdev, &rproc->subdevs, node)
+	list_for_each_entry_reverse(subdev, &rproc->subdevs, node)
 		subdev->remove(subdev);
 		subdev->remove(subdev);
 }
 }