diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-10-19 21:49:54 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-24 21:54:24 -0400 |
commit | e2100efb266c9335925191afe79f81f8d0a5807e (patch) | |
tree | 685cea696b705b7544cfc16e90213b03158df016 | |
parent | 859deea949c382d9ccb6397fe33df3703ecef45d (diff) |
[POWERPC] Fix device_is_compatible() const warning
Fix a const'ification related warning with device_is_compatible()
and friends related to get_property() not properly having const
on it's input device node argument.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/kernel/prom.c | 8 | ||||
-rw-r--r-- | include/asm-powerpc/prom.h | 10 |
2 files changed, 11 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 865b9648d0d5..bdb412d4b748 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -1014,7 +1014,7 @@ EXPORT_SYMBOL(find_all_nodes); | |||
1014 | /** Checks if the given "compat" string matches one of the strings in | 1014 | /** Checks if the given "compat" string matches one of the strings in |
1015 | * the device's "compatible" property | 1015 | * the device's "compatible" property |
1016 | */ | 1016 | */ |
1017 | int device_is_compatible(struct device_node *device, const char *compat) | 1017 | int device_is_compatible(const struct device_node *device, const char *compat) |
1018 | { | 1018 | { |
1019 | const char* cp; | 1019 | const char* cp; |
1020 | int cplen, l; | 1020 | int cplen, l; |
@@ -1491,7 +1491,8 @@ static int __init prom_reconfig_setup(void) | |||
1491 | __initcall(prom_reconfig_setup); | 1491 | __initcall(prom_reconfig_setup); |
1492 | #endif | 1492 | #endif |
1493 | 1493 | ||
1494 | struct property *of_find_property(struct device_node *np, const char *name, | 1494 | struct property *of_find_property(const struct device_node *np, |
1495 | const char *name, | ||
1495 | int *lenp) | 1496 | int *lenp) |
1496 | { | 1497 | { |
1497 | struct property *pp; | 1498 | struct property *pp; |
@@ -1512,7 +1513,8 @@ struct property *of_find_property(struct device_node *np, const char *name, | |||
1512 | * Find a property with a given name for a given node | 1513 | * Find a property with a given name for a given node |
1513 | * and return the value. | 1514 | * and return the value. |
1514 | */ | 1515 | */ |
1515 | const void *get_property(struct device_node *np, const char *name, int *lenp) | 1516 | const void *get_property(const struct device_node *np, const char *name, |
1517 | int *lenp) | ||
1516 | { | 1518 | { |
1517 | struct property *pp = of_find_property(np,name,lenp); | 1519 | struct property *pp = of_find_property(np,name,lenp); |
1518 | return pp ? pp->value : NULL; | 1520 | return pp ? pp->value : NULL; |
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 524629769336..ec11d44eaeb5 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -134,7 +134,7 @@ extern struct device_node *of_find_all_nodes(struct device_node *prev); | |||
134 | extern struct device_node *of_get_parent(const struct device_node *node); | 134 | extern struct device_node *of_get_parent(const struct device_node *node); |
135 | extern struct device_node *of_get_next_child(const struct device_node *node, | 135 | extern struct device_node *of_get_next_child(const struct device_node *node, |
136 | struct device_node *prev); | 136 | struct device_node *prev); |
137 | extern struct property *of_find_property(struct device_node *np, | 137 | extern struct property *of_find_property(const struct device_node *np, |
138 | const char *name, | 138 | const char *name, |
139 | int *lenp); | 139 | int *lenp); |
140 | extern struct device_node *of_node_get(struct device_node *node); | 140 | extern struct device_node *of_node_get(struct device_node *node); |
@@ -158,10 +158,12 @@ extern void of_detach_node(const struct device_node *); | |||
158 | extern void finish_device_tree(void); | 158 | extern void finish_device_tree(void); |
159 | extern void unflatten_device_tree(void); | 159 | extern void unflatten_device_tree(void); |
160 | extern void early_init_devtree(void *); | 160 | extern void early_init_devtree(void *); |
161 | extern int device_is_compatible(struct device_node *device, const char *); | 161 | extern int device_is_compatible(const struct device_node *device, |
162 | const char *); | ||
162 | extern int machine_is_compatible(const char *compat); | 163 | extern int machine_is_compatible(const char *compat); |
163 | extern const void *get_property(struct device_node *node, const char *name, | 164 | extern const void *get_property(const struct device_node *node, |
164 | int *lenp); | 165 | const char *name, |
166 | int *lenp); | ||
165 | extern void print_properties(struct device_node *node); | 167 | extern void print_properties(struct device_node *node); |
166 | extern int prom_n_addr_cells(struct device_node* np); | 168 | extern int prom_n_addr_cells(struct device_node* np); |
167 | extern int prom_n_size_cells(struct device_node* np); | 169 | extern int prom_n_size_cells(struct device_node* np); |