diff options
Diffstat (limited to 'arch/sparc/kernel/prom_common.c')
-rw-r--r-- | arch/sparc/kernel/prom_common.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c index d80a65d9e893..57ac9e28be0c 100644 --- a/arch/sparc/kernel/prom_common.c +++ b/arch/sparc/kernel/prom_common.c | |||
@@ -37,18 +37,6 @@ EXPORT_SYMBOL(of_console_path); | |||
37 | char *of_console_options; | 37 | char *of_console_options; |
38 | EXPORT_SYMBOL(of_console_options); | 38 | EXPORT_SYMBOL(of_console_options); |
39 | 39 | ||
40 | struct device_node *of_find_node_by_phandle(phandle handle) | ||
41 | { | ||
42 | struct device_node *np; | ||
43 | |||
44 | for (np = allnodes; np; np = np->allnext) | ||
45 | if (np->node == handle) | ||
46 | break; | ||
47 | |||
48 | return np; | ||
49 | } | ||
50 | EXPORT_SYMBOL(of_find_node_by_phandle); | ||
51 | |||
52 | int of_getintprop_default(struct device_node *np, const char *name, int def) | 40 | int of_getintprop_default(struct device_node *np, const char *name, int def) |
53 | { | 41 | { |
54 | struct property *prop; | 42 | struct property *prop; |
@@ -89,7 +77,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len | |||
89 | void *old_val = prop->value; | 77 | void *old_val = prop->value; |
90 | int ret; | 78 | int ret; |
91 | 79 | ||
92 | ret = prom_setprop(dp->node, name, val, len); | 80 | ret = prom_setprop(dp->phandle, name, val, len); |
93 | 81 | ||
94 | err = -EINVAL; | 82 | err = -EINVAL; |
95 | if (ret >= 0) { | 83 | if (ret >= 0) { |
@@ -236,7 +224,7 @@ static struct device_node * __init prom_create_node(phandle node, | |||
236 | 224 | ||
237 | dp->name = get_one_property(node, "name"); | 225 | dp->name = get_one_property(node, "name"); |
238 | dp->type = get_one_property(node, "device_type"); | 226 | dp->type = get_one_property(node, "device_type"); |
239 | dp->node = node; | 227 | dp->phandle = node; |
240 | 228 | ||
241 | dp->properties = build_prop_list(node); | 229 | dp->properties = build_prop_list(node); |
242 | 230 | ||
@@ -313,7 +301,7 @@ void __init prom_build_devicetree(void) | |||
313 | 301 | ||
314 | nextp = &allnodes->allnext; | 302 | nextp = &allnodes->allnext; |
315 | allnodes->child = prom_build_tree(allnodes, | 303 | allnodes->child = prom_build_tree(allnodes, |
316 | prom_getchild(allnodes->node), | 304 | prom_getchild(allnodes->phandle), |
317 | &nextp); | 305 | &nextp); |
318 | of_console_init(); | 306 | of_console_init(); |
319 | 307 | ||