diff mbox series

[RFC,3/3] of: dynamic: add device links barrier before detach

Message ID 20201014193615.1045792-4-michael.auchter@ni.com
State RFC, archived
Headers show
Series Fix errors on DT overlay removal with devlinks | expand

Checks

Context Check Description
robh/checkpatch warning total: 1 errors, 0 warnings, 0 lines checked

Commit Message

Michael Auchter Oct. 14, 2020, 7:36 p.m. UTC
Signed-off-by: Michael Auchter <michael.auchter@ni.com>
---
 drivers/of/dynamic.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
index 7478bfc8d440..a4e2881524e9 100644
--- a/drivers/of/dynamic.c
+++ b/drivers/of/dynamic.c
@@ -14,6 +14,7 @@ 
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/proc_fs.h>
+#include <linux/device.h>
 
 #include "of_private.h"
 
@@ -688,6 +689,8 @@  void of_changeset_destroy(struct of_changeset *ocs)
 {
 	struct of_changeset_entry *ce, *cen;
 
+	device_links_barrier();
+
 	list_for_each_entry_safe_reverse(ce, cen, &ocs->entries, node)
 		__of_changeset_entry_destroy(ce);
 }