Skip to content

Commit 3c3c8e3

Browse files
committed
Merge remote-tracking branch 'grant/devicetree/next' into for-next
2 parents ffe24b2 + fca8ba4 commit 3c3c8e3

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

drivers/of/unittest.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ static struct selftest_results {
3030
int failed;
3131
} selftest_results;
3232

33-
#define NO_OF_NODES 3
34-
static struct device_node *nodes[NO_OF_NODES];
35-
static int last_node_index;
36-
static bool selftest_live_tree;
37-
3833
#define selftest(result, fmt, ...) ({ \
3934
bool failed = !(result); \
4035
if (failed) { \
@@ -833,13 +828,6 @@ static int attach_node_and_children(struct device_node *np)
833828
return 0;
834829
}
835830

836-
/* Children of the root need to be remembered for removal */
837-
if (np->parent == of_root) {
838-
if (WARN_ON(last_node_index >= NO_OF_NODES))
839-
return -EINVAL;
840-
nodes[last_node_index++] = np;
841-
}
842-
843831
child = np->child;
844832
np->child = NULL;
845833

@@ -902,10 +890,7 @@ static int __init selftest_data_add(void)
902890
}
903891

904892
if (!of_root) {
905-
/* enabling flag for removing nodes */
906-
selftest_live_tree = true;
907893
of_root = selftest_data_node;
908-
909894
for_each_of_allnodes(np)
910895
__of_attach_node_sysfs(np);
911896
of_aliases = of_find_node_by_path("/aliases");

0 commit comments

Comments
 (0)