diff options
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 30 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mmio_nvram.c | 4 |
2 files changed, 17 insertions, 17 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)); |
diff --git a/arch/powerpc/sysdev/mmio_nvram.c b/arch/powerpc/sysdev/mmio_nvram.c index 615350d46b52..ff23f5a4d4b9 100644 --- a/arch/powerpc/sysdev/mmio_nvram.c +++ b/arch/powerpc/sysdev/mmio_nvram.c | |||
@@ -80,7 +80,7 @@ static ssize_t mmio_nvram_get_size(void) | |||
80 | int __init mmio_nvram_init(void) | 80 | int __init mmio_nvram_init(void) |
81 | { | 81 | { |
82 | struct device_node *nvram_node; | 82 | struct device_node *nvram_node; |
83 | unsigned long *buffer; | 83 | const unsigned long *buffer; |
84 | int proplen; | 84 | int proplen; |
85 | unsigned long nvram_addr; | 85 | unsigned long nvram_addr; |
86 | int ret; | 86 | int ret; |
@@ -91,7 +91,7 @@ int __init mmio_nvram_init(void) | |||
91 | goto out; | 91 | goto out; |
92 | 92 | ||
93 | ret = -EIO; | 93 | ret = -EIO; |
94 | buffer = (unsigned long *)get_property(nvram_node, "reg", &proplen); | 94 | buffer = get_property(nvram_node, "reg", &proplen); |
95 | if (proplen != 2*sizeof(unsigned long)) | 95 | if (proplen != 2*sizeof(unsigned long)) |
96 | goto out; | 96 | goto out; |
97 | 97 | ||