Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55835
b: refs/heads/master
c: aa5242e
h: refs/heads/master
i:
  55833: 982aba9
  55831: ba266d7
v: v3
  • Loading branch information
David S. Miller committed May 10, 2007
1 parent cd79b98 commit 196bab4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7cc5c8559c62289d027812bfdd4eb6a28c5769b6
refs/heads/master: aa5242e78f8667ba771e4c0d44bf45871abceb7e
19 changes: 15 additions & 4 deletions trunk/arch/sparc64/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1636,10 +1636,21 @@ static struct device_node * __init create_node(phandle node, struct device_node

static struct device_node * __init build_tree(struct device_node *parent, phandle node, struct device_node ***nextp)
{
struct device_node *ret = NULL, *prev_sibling = NULL;
struct device_node *dp;

dp = create_node(node, parent);
if (dp) {
while (1) {
dp = create_node(node, parent);
if (!dp)
break;

if (prev_sibling)
prev_sibling->sibling = dp;

if (!ret)
ret = dp;
prev_sibling = dp;

*(*nextp) = dp;
*nextp = &dp->allnext;

Expand All @@ -1648,10 +1659,10 @@ static struct device_node * __init build_tree(struct device_node *parent, phandl

dp->child = build_tree(dp, prom_getchild(node), nextp);

dp->sibling = build_tree(parent, prom_getsibling(node), nextp);
node = prom_getsibling(node);
}

return dp;
return ret;
}

void __init prom_build_devicetree(void)
Expand Down

0 comments on commit 196bab4

Please sign in to comment.