aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/of/unittest.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 139363af5c88..7aa1d6dae5ba 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -27,11 +27,6 @@ static struct selftest_results {
27 int failed; 27 int failed;
28} selftest_results; 28} selftest_results;
29 29
30#define NO_OF_NODES 3
31static struct device_node *nodes[NO_OF_NODES];
32static int last_node_index;
33static bool selftest_live_tree;
34
35#define selftest(result, fmt, ...) ({ \ 30#define selftest(result, fmt, ...) ({ \
36 bool failed = !(result); \ 31 bool failed = !(result); \
37 if (failed) { \ 32 if (failed) { \
@@ -830,13 +825,6 @@ static int attach_node_and_children(struct device_node *np)
830 return 0; 825 return 0;
831 } 826 }
832 827
833 /* Children of the root need to be remembered for removal */
834 if (np->parent == of_root) {
835 if (WARN_ON(last_node_index >= NO_OF_NODES))
836 return -EINVAL;
837 nodes[last_node_index++] = np;
838 }
839
840 child = np->child; 828 child = np->child;
841 np->child = NULL; 829 np->child = NULL;
842 830
@@ -899,10 +887,7 @@ static int __init selftest_data_add(void)
899 } 887 }
900 888
901 if (!of_root) { 889 if (!of_root) {
902 /* enabling flag for removing nodes */
903 selftest_live_tree = true;
904 of_root = selftest_data_node; 890 of_root = selftest_data_node;
905
906 for_each_of_allnodes(np) 891 for_each_of_allnodes(np)
907 __of_attach_node_sysfs(np); 892 __of_attach_node_sysfs(np);
908 of_aliases = of_find_node_by_path("/aliases"); 893 of_aliases = of_find_node_by_path("/aliases");