aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/85xx
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-07-12 01:39:42 -0400
committerPaul Mackerras <paulus@samba.org>2006-07-31 01:55:04 -0400
commit8efca49329a50710d656a8bb78d6f0f0e2f48a26 (patch)
tree6843306ed52bb6f9b932633ddaf1df90431a2ab6 /arch/powerpc/platforms/85xx
parentc4c7cba90cf9f180a2c45f7e54143f786360f3dd (diff)
[POWERPC] mpc: 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. mpc* platform changes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/85xx')
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c4
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c4
-rw-r--r--arch/powerpc/platforms/85xx/pci.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 06a497676c99..d0cfcdb1d1b5 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -172,9 +172,9 @@ static void __init mpc85xx_ads_setup_arch(void)
172 172
173 cpu = of_find_node_by_type(NULL, "cpu"); 173 cpu = of_find_node_by_type(NULL, "cpu");
174 if (cpu != 0) { 174 if (cpu != 0) {
175 unsigned int *fp; 175 const unsigned int *fp;
176 176
177 fp = (int *)get_property(cpu, "clock-frequency", NULL); 177 fp = get_property(cpu, "clock-frequency", NULL);
178 if (fp != 0) 178 if (fp != 0)
179 loops_per_jiffy = *fp / HZ; 179 loops_per_jiffy = *fp / HZ;
180 else 180 else
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 18e6e11f7020..5fd53eba6912 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -273,9 +273,9 @@ mpc85xx_cds_setup_arch(void)
273 273
274 cpu = of_find_node_by_type(NULL, "cpu"); 274 cpu = of_find_node_by_type(NULL, "cpu");
275 if (cpu != 0) { 275 if (cpu != 0) {
276 unsigned int *fp; 276 const unsigned int *fp;
277 277
278 fp = (int *)get_property(cpu, "clock-frequency", NULL); 278 fp = get_property(cpu, "clock-frequency", NULL);
279 if (fp != 0) 279 if (fp != 0)
280 loops_per_jiffy = *fp / HZ; 280 loops_per_jiffy = *fp / HZ;
281 else 281 else
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c
index 1d51f3242ab1..05930eeb6e7f 100644
--- a/arch/powerpc/platforms/85xx/pci.c
+++ b/arch/powerpc/platforms/85xx/pci.c
@@ -41,7 +41,7 @@ int __init add_bridge(struct device_node *dev)
41 int len; 41 int len;
42 struct pci_controller *hose; 42 struct pci_controller *hose;
43 struct resource rsrc; 43 struct resource rsrc;
44 int *bus_range; 44 const int *bus_range;
45 int primary = 1, has_address = 0; 45 int primary = 1, has_address = 0;
46 phys_addr_t immr = get_immrbase(); 46 phys_addr_t immr = get_immrbase();
47 47
@@ -51,7 +51,7 @@ int __init add_bridge(struct device_node *dev)
51 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); 51 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
52 52
53 /* Get bus range if any */ 53 /* Get bus range if any */
54 bus_range = (int *) get_property(dev, "bus-range", &len); 54 bus_range = get_property(dev, "bus-range", &len);
55 if (bus_range == NULL || len < 2 * sizeof(int)) { 55 if (bus_range == NULL || len < 2 * sizeof(int)) {
56 printk(KERN_WARNING "Can't get bus-range for %s, assume" 56 printk(KERN_WARNING "Can't get bus-range for %s, assume"
57 " bus 0\n", dev->full_name); 57 " bus 0\n", dev->full_name);