diff mbox series

[v1,2/2] of: unittest: remove check for of_root

Message ID 20220623105044.152832-3-clement.leger@bootlin.com
State Changes Requested, archived
Headers show
Series of: populate of_root node if not set | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied fail build log

Commit Message

Clément Léger June 23, 2022, 10:50 a.m. UTC
Now that of_root node is always populated in of_core_init(), remove
this manual tree creation and assume that the root node always exists.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
---
 drivers/of/unittest.c | 10 ----------
 1 file changed, 10 deletions(-)
diff mbox series

Patch

diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 7f6bba18c515..a787d212c0f6 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -1469,16 +1469,6 @@  static int __init unittest_data_add(void)
 		return -EINVAL;
 	}
 
-	if (!of_root) {
-		of_root = unittest_data_node;
-		for_each_of_allnodes(np)
-			__of_attach_node_sysfs(np);
-		of_aliases = of_find_node_by_path("/aliases");
-		of_chosen = of_find_node_by_path("/chosen");
-		of_overlay_mutex_unlock();
-		return 0;
-	}
-
 	EXPECT_BEGIN(KERN_INFO,
 		     "Duplicate name in testcase-data, renamed to \"duplicate-name#1\"");