diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2006-07-12 01:35:54 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 01:55:04 -0400 |
commit | a7f67bdf2c9f24509b8e81e0f35573b611987c80 (patch) | |
tree | 201662dd6504418ef3c84cfe1f280153a4d8cb29 /arch/powerpc/sysdev/fsl_soc.c | |
parent | 4288b92b9644fdb4c6168273873fe08f32090d7a (diff) |
[POWERPC] Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.
powerpc core changes.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_soc.c')
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index e983972132d8..07c47e8309ed 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -41,7 +41,7 @@ phys_addr_t get_immrbase(void) | |||
41 | soc = of_find_node_by_type(NULL, "soc"); | 41 | soc = of_find_node_by_type(NULL, "soc"); |
42 | if (soc) { | 42 | if (soc) { |
43 | unsigned int size; | 43 | unsigned int size; |
44 | void *prop = get_property(soc, "reg", &size); | 44 | const void *prop = get_property(soc, "reg", &size); |
45 | immrbase = of_translate_address(soc, prop); | 45 | immrbase = of_translate_address(soc, prop); |
46 | of_node_put(soc); | 46 | of_node_put(soc); |
47 | }; | 47 | }; |
@@ -86,8 +86,8 @@ static int __init gfar_mdio_of_init(void) | |||
86 | 86 | ||
87 | while ((child = of_get_next_child(np, child)) != NULL) { | 87 | while ((child = of_get_next_child(np, child)) != NULL) { |
88 | if (child->n_intrs) { | 88 | if (child->n_intrs) { |
89 | u32 *id = | 89 | const u32 *id = |
90 | (u32 *) get_property(child, "reg", NULL); | 90 | get_property(child, "reg", NULL); |
91 | mdio_data.irq[*id] = child->intrs[0].line; | 91 | mdio_data.irq[*id] = child->intrs[0].line; |
92 | } | 92 | } |
93 | } | 93 | } |
@@ -127,10 +127,10 @@ static int __init gfar_of_init(void) | |||
127 | struct resource r[4]; | 127 | struct resource r[4]; |
128 | struct device_node *phy, *mdio; | 128 | struct device_node *phy, *mdio; |
129 | struct gianfar_platform_data gfar_data; | 129 | struct gianfar_platform_data gfar_data; |
130 | unsigned int *id; | 130 | const unsigned int *id; |
131 | char *model; | 131 | const char *model; |
132 | void *mac_addr; | 132 | const void *mac_addr; |
133 | phandle *ph; | 133 | const phandle *ph; |
134 | 134 | ||
135 | memset(r, 0, sizeof(r)); | 135 | memset(r, 0, sizeof(r)); |
136 | memset(&gfar_data, 0, sizeof(gfar_data)); | 136 | memset(&gfar_data, 0, sizeof(gfar_data)); |
@@ -188,7 +188,7 @@ static int __init gfar_of_init(void) | |||
188 | FSL_GIANFAR_DEV_HAS_VLAN | | 188 | FSL_GIANFAR_DEV_HAS_VLAN | |
189 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; | 189 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; |
190 | 190 | ||
191 | ph = (phandle *) get_property(np, "phy-handle", NULL); | 191 | ph = get_property(np, "phy-handle", NULL); |
192 | phy = of_find_node_by_phandle(*ph); | 192 | phy = of_find_node_by_phandle(*ph); |
193 | 193 | ||
194 | if (phy == NULL) { | 194 | if (phy == NULL) { |
@@ -198,7 +198,7 @@ static int __init gfar_of_init(void) | |||
198 | 198 | ||
199 | mdio = of_get_parent(phy); | 199 | mdio = of_get_parent(phy); |
200 | 200 | ||
201 | id = (u32 *) get_property(phy, "reg", NULL); | 201 | id = get_property(phy, "reg", NULL); |
202 | ret = of_address_to_resource(mdio, 0, &res); | 202 | ret = of_address_to_resource(mdio, 0, &res); |
203 | if (ret) { | 203 | if (ret) { |
204 | of_node_put(phy); | 204 | of_node_put(phy); |
@@ -242,7 +242,7 @@ static int __init fsl_i2c_of_init(void) | |||
242 | i++) { | 242 | i++) { |
243 | struct resource r[2]; | 243 | struct resource r[2]; |
244 | struct fsl_i2c_platform_data i2c_data; | 244 | struct fsl_i2c_platform_data i2c_data; |
245 | unsigned char *flags = NULL; | 245 | const unsigned char *flags = NULL; |
246 | 246 | ||
247 | memset(&r, 0, sizeof(r)); | 247 | memset(&r, 0, sizeof(r)); |
248 | memset(&i2c_data, 0, sizeof(i2c_data)); | 248 | memset(&i2c_data, 0, sizeof(i2c_data)); |
@@ -294,7 +294,7 @@ static int __init mpc83xx_wdt_init(void) | |||
294 | struct resource r; | 294 | struct resource r; |
295 | struct device_node *soc, *np; | 295 | struct device_node *soc, *np; |
296 | struct platform_device *dev; | 296 | struct platform_device *dev; |
297 | unsigned int *freq; | 297 | const unsigned int *freq; |
298 | int ret; | 298 | int ret; |
299 | 299 | ||
300 | np = of_find_compatible_node(NULL, "watchdog", "mpc83xx_wdt"); | 300 | np = of_find_compatible_node(NULL, "watchdog", "mpc83xx_wdt"); |
@@ -311,7 +311,7 @@ static int __init mpc83xx_wdt_init(void) | |||
311 | goto nosoc; | 311 | goto nosoc; |
312 | } | 312 | } |
313 | 313 | ||
314 | freq = (unsigned int *)get_property(soc, "bus-frequency", NULL); | 314 | freq = get_property(soc, "bus-frequency", NULL); |
315 | if (!freq) { | 315 | if (!freq) { |
316 | ret = -ENODEV; | 316 | ret = -ENODEV; |
317 | goto err; | 317 | goto err; |
@@ -351,7 +351,7 @@ nodev: | |||
351 | arch_initcall(mpc83xx_wdt_init); | 351 | arch_initcall(mpc83xx_wdt_init); |
352 | #endif | 352 | #endif |
353 | 353 | ||
354 | static enum fsl_usb2_phy_modes determine_usb_phy(char * phy_type) | 354 | static enum fsl_usb2_phy_modes determine_usb_phy(const char *phy_type) |
355 | { | 355 | { |
356 | if (!phy_type) | 356 | if (!phy_type) |
357 | return FSL_USB2_PHY_NONE; | 357 | return FSL_USB2_PHY_NONE; |
@@ -379,7 +379,7 @@ static int __init fsl_usb_of_init(void) | |||
379 | i++) { | 379 | i++) { |
380 | struct resource r[2]; | 380 | struct resource r[2]; |
381 | struct fsl_usb2_platform_data usb_data; | 381 | struct fsl_usb2_platform_data usb_data; |
382 | unsigned char *prop = NULL; | 382 | const unsigned char *prop = NULL; |
383 | 383 | ||
384 | memset(&r, 0, sizeof(r)); | 384 | memset(&r, 0, sizeof(r)); |
385 | memset(&usb_data, 0, sizeof(usb_data)); | 385 | memset(&usb_data, 0, sizeof(usb_data)); |
@@ -428,7 +428,7 @@ static int __init fsl_usb_of_init(void) | |||
428 | i++) { | 428 | i++) { |
429 | struct resource r[2]; | 429 | struct resource r[2]; |
430 | struct fsl_usb2_platform_data usb_data; | 430 | struct fsl_usb2_platform_data usb_data; |
431 | unsigned char *prop = NULL; | 431 | const unsigned char *prop = NULL; |
432 | 432 | ||
433 | memset(&r, 0, sizeof(r)); | 433 | memset(&r, 0, sizeof(r)); |
434 | memset(&usb_data, 0, sizeof(usb_data)); | 434 | memset(&usb_data, 0, sizeof(usb_data)); |