diff options
Diffstat (limited to 'arch/sparc/kernel/prom_common.c')
| -rw-r--r-- | arch/sparc/kernel/prom_common.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c index 0fb5789d43c8..138910c67206 100644 --- a/arch/sparc/kernel/prom_common.c +++ b/arch/sparc/kernel/prom_common.c | |||
| @@ -22,9 +22,12 @@ | |||
| 22 | #include <linux/of.h> | 22 | #include <linux/of.h> |
| 23 | #include <asm/prom.h> | 23 | #include <asm/prom.h> |
| 24 | #include <asm/oplib.h> | 24 | #include <asm/oplib.h> |
| 25 | #include <asm/leon.h> | ||
| 25 | 26 | ||
| 26 | #include "prom.h" | 27 | #include "prom.h" |
| 27 | 28 | ||
| 29 | void (*prom_build_more)(struct device_node *dp, struct device_node ***nextp); | ||
| 30 | |||
| 28 | struct device_node *of_console_device; | 31 | struct device_node *of_console_device; |
| 29 | EXPORT_SYMBOL(of_console_device); | 32 | EXPORT_SYMBOL(of_console_device); |
| 30 | 33 | ||
| @@ -161,7 +164,7 @@ static struct property * __init build_one_prop(phandle node, char *prev, | |||
| 161 | name = prom_nextprop(node, prev, p->name); | 164 | name = prom_nextprop(node, prev, p->name); |
| 162 | } | 165 | } |
| 163 | 166 | ||
| 164 | if (strlen(name) == 0) { | 167 | if (!name || strlen(name) == 0) { |
| 165 | tmp = p; | 168 | tmp = p; |
| 166 | return NULL; | 169 | return NULL; |
| 167 | } | 170 | } |
| @@ -242,7 +245,7 @@ static struct device_node * __init prom_create_node(phandle node, | |||
| 242 | return dp; | 245 | return dp; |
| 243 | } | 246 | } |
| 244 | 247 | ||
| 245 | static char * __init build_full_name(struct device_node *dp) | 248 | char * __init build_full_name(struct device_node *dp) |
| 246 | { | 249 | { |
| 247 | int len, ourlen, plen; | 250 | int len, ourlen, plen; |
| 248 | char *n; | 251 | char *n; |
| @@ -289,6 +292,9 @@ static struct device_node * __init prom_build_tree(struct device_node *parent, | |||
| 289 | 292 | ||
| 290 | dp->child = prom_build_tree(dp, prom_getchild(node), nextp); | 293 | dp->child = prom_build_tree(dp, prom_getchild(node), nextp); |
| 291 | 294 | ||
| 295 | if (prom_build_more) | ||
| 296 | prom_build_more(dp, nextp); | ||
| 297 | |||
| 292 | node = prom_getsibling(node); | 298 | node = prom_getsibling(node); |
| 293 | } | 299 | } |
| 294 | 300 | ||
