Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123374
b: refs/heads/master
c: 4aef8c5
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Dec 6, 2008
1 parent 5cb4c27 commit 6d7ee18
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 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: 7d9439d50b6dadcfdf6d28be2234461709719e14
refs/heads/master: 4aef8c53fe517542d8185b7d771f291865b49177
20 changes: 15 additions & 5 deletions trunk/arch/sparc/kernel/prom_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,23 +198,33 @@ static char * __init build_full_name(struct device_node *dp)

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;

dp->parent = parent;
dp->path_component_name = build_path_component(dp);
dp->full_name = build_full_name(dp);

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;
}

struct device_node *of_console_device;
Expand Down

0 comments on commit 6d7ee18

Please sign in to comment.