diff options
-rw-r--r-- | arch/sparc/kernel/prom.c | 9 | ||||
-rw-r--r-- | include/asm-sparc/prom.h | 10 |
2 files changed, 12 insertions, 7 deletions
diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c index d2a8297d56fa..9ddf6035915c 100644 --- a/arch/sparc/kernel/prom.c +++ b/arch/sparc/kernel/prom.c | |||
@@ -32,7 +32,8 @@ static struct device_node *allnodes; | |||
32 | */ | 32 | */ |
33 | static DEFINE_RWLOCK(devtree_lock); | 33 | static DEFINE_RWLOCK(devtree_lock); |
34 | 34 | ||
35 | int of_device_is_compatible(struct device_node *device, const char *compat) | 35 | int of_device_is_compatible(const struct device_node *device, |
36 | const char *compat) | ||
36 | { | 37 | { |
37 | const char* cp; | 38 | const char* cp; |
38 | int cplen, l; | 39 | int cplen, l; |
@@ -150,7 +151,8 @@ struct device_node *of_find_compatible_node(struct device_node *from, | |||
150 | } | 151 | } |
151 | EXPORT_SYMBOL(of_find_compatible_node); | 152 | EXPORT_SYMBOL(of_find_compatible_node); |
152 | 153 | ||
153 | struct property *of_find_property(struct device_node *np, const char *name, | 154 | struct property *of_find_property(const struct device_node *np, |
155 | const char *name, | ||
154 | int *lenp) | 156 | int *lenp) |
155 | { | 157 | { |
156 | struct property *pp; | 158 | struct property *pp; |
@@ -170,7 +172,8 @@ EXPORT_SYMBOL(of_find_property); | |||
170 | * Find a property with a given name for a given node | 172 | * Find a property with a given name for a given node |
171 | * and return the value. | 173 | * and return the value. |
172 | */ | 174 | */ |
173 | const void *of_get_property(struct device_node *np, const char *name, int *lenp) | 175 | const void *of_get_property(const struct device_node *np, const char *name, |
176 | int *lenp) | ||
174 | { | 177 | { |
175 | struct property *pp = of_find_property(np,name,lenp); | 178 | struct property *pp = of_find_property(np,name,lenp); |
176 | return pp ? pp->value : NULL; | 179 | return pp ? pp->value : NULL; |
diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index 30d53ed4f5cd..39ad2224a117 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h | |||
@@ -85,12 +85,14 @@ extern struct device_node *of_find_node_by_phandle(phandle handle); | |||
85 | extern struct device_node *of_get_parent(const struct device_node *node); | 85 | extern struct device_node *of_get_parent(const struct device_node *node); |
86 | extern struct device_node *of_get_next_child(const struct device_node *node, | 86 | extern struct device_node *of_get_next_child(const struct device_node *node, |
87 | struct device_node *prev); | 87 | struct device_node *prev); |
88 | extern struct property *of_find_property(struct device_node *np, | 88 | extern struct property *of_find_property(const struct device_node *np, |
89 | const char *name, | 89 | const char *name, |
90 | int *lenp); | 90 | int *lenp); |
91 | extern int of_device_is_compatible(struct device_node *device, const char *); | 91 | extern int of_device_is_compatible(const struct device_node *device, |
92 | extern const void *of_get_property(struct device_node *node, const char *name, | 92 | const char *); |
93 | int *lenp); | 93 | extern const void *of_get_property(const struct device_node *node, |
94 | const char *name, | ||
95 | int *lenp); | ||
94 | #define get_property(node,name,lenp) of_get_property(node,name,lenp) | 96 | #define get_property(node,name,lenp) of_get_property(node,name,lenp) |
95 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | 97 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); |
96 | extern int of_getintprop_default(struct device_node *np, | 98 | extern int of_getintprop_default(struct device_node *np, |