diff options
author | David S. Miller <davem@davemloft.net> | 2008-12-05 04:06:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-05 20:08:23 -0500 |
commit | 06c0db7221de09cdf1d5dd2ce2780cc3361ad9f9 (patch) | |
tree | 83ebae7f988d3a26fecbe1b0cd66430e995cad02 /arch/sparc/kernel/prom_32.c | |
parent | 59966e3b4e9e6573b352301ad0ceed15196d4e2d (diff) |
sparc: Make sparc32's create_node() assign parent pointer.
This makes it match what sparc64's version does.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/prom_32.c')
-rw-r--r-- | arch/sparc/kernel/prom_32.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/sparc/kernel/prom_32.c b/arch/sparc/kernel/prom_32.c index a6809bc9ab9d..5818aa9e85a0 100644 --- a/arch/sparc/kernel/prom_32.c +++ b/arch/sparc/kernel/prom_32.c | |||
@@ -210,7 +210,7 @@ static char * __init get_one_property(phandle node, const char *name) | |||
210 | return buf; | 210 | return buf; |
211 | } | 211 | } |
212 | 212 | ||
213 | static struct device_node * __init create_node(phandle node) | 213 | static struct device_node * __init create_node(phandle node, struct device_node *parent) |
214 | { | 214 | { |
215 | struct device_node *dp; | 215 | struct device_node *dp; |
216 | 216 | ||
@@ -219,6 +219,7 @@ static struct device_node * __init create_node(phandle node) | |||
219 | 219 | ||
220 | dp = prom_early_alloc(sizeof(*dp)); | 220 | dp = prom_early_alloc(sizeof(*dp)); |
221 | dp->unique_id = prom_unique_id++; | 221 | dp->unique_id = prom_unique_id++; |
222 | dp->parent = parent; | ||
222 | 223 | ||
223 | kref_init(&dp->kref); | 224 | kref_init(&dp->kref); |
224 | 225 | ||
@@ -237,7 +238,7 @@ static struct device_node * __init build_tree(struct device_node *parent, phandl | |||
237 | { | 238 | { |
238 | struct device_node *dp; | 239 | struct device_node *dp; |
239 | 240 | ||
240 | dp = create_node(node); | 241 | dp = create_node(node, parent); |
241 | if (dp) { | 242 | if (dp) { |
242 | *(*nextp) = dp; | 243 | *(*nextp) = dp; |
243 | *nextp = &dp->allnext; | 244 | *nextp = &dp->allnext; |
@@ -387,7 +388,7 @@ void __init prom_build_devicetree(void) | |||
387 | { | 388 | { |
388 | struct device_node **nextp; | 389 | struct device_node **nextp; |
389 | 390 | ||
390 | allnodes = create_node(prom_root_node); | 391 | allnodes = create_node(prom_root_node, NULL); |
391 | allnodes->path_component_name = ""; | 392 | allnodes->path_component_name = ""; |
392 | allnodes->full_name = "/"; | 393 | allnodes->full_name = "/"; |
393 | 394 | ||