diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2006-07-12 01:39:42 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 01:55:04 -0400 |
commit | 8efca49329a50710d656a8bb78d6f0f0e2f48a26 (patch) | |
tree | 6843306ed52bb6f9b932633ddaf1df90431a2ab6 | |
parent | c4c7cba90cf9f180a2c45f7e54143f786360f3dd (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>
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc834x_itx.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc834x_sys.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/pci.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ads.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_cds.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/pci.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/pci.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 8 |
9 files changed, 20 insertions, 20 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index b46305645d38..d9675f9b9766 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c | |||
@@ -80,8 +80,8 @@ static void __init mpc834x_itx_setup_arch(void) | |||
80 | 80 | ||
81 | np = of_find_node_by_type(NULL, "cpu"); | 81 | np = of_find_node_by_type(NULL, "cpu"); |
82 | if (np != 0) { | 82 | if (np != 0) { |
83 | unsigned int *fp = | 83 | const unsigned int *fp = |
84 | (int *)get_property(np, "clock-frequency", NULL); | 84 | get_property(np, "clock-frequency", NULL); |
85 | if (fp != 0) | 85 | if (fp != 0) |
86 | loops_per_jiffy = *fp / HZ; | 86 | loops_per_jiffy = *fp / HZ; |
87 | else | 87 | else |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c index 3e1c16eb4a63..5eadf9d035f1 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.c +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c | |||
@@ -84,8 +84,8 @@ static void __init mpc834x_sys_setup_arch(void) | |||
84 | 84 | ||
85 | np = of_find_node_by_type(NULL, "cpu"); | 85 | np = of_find_node_by_type(NULL, "cpu"); |
86 | if (np != 0) { | 86 | if (np != 0) { |
87 | unsigned int *fp = | 87 | const unsigned int *fp = |
88 | (int *)get_property(np, "clock-frequency", NULL); | 88 | get_property(np, "clock-frequency", NULL); |
89 | if (fp != 0) | 89 | if (fp != 0) |
90 | loops_per_jiffy = *fp / HZ; | 90 | loops_per_jiffy = *fp / HZ; |
91 | else | 91 | else |
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c index 3b5e563c279f..9c3650555144 100644 --- a/arch/powerpc/platforms/83xx/pci.c +++ b/arch/powerpc/platforms/83xx/pci.c | |||
@@ -50,7 +50,7 @@ int __init add_bridge(struct device_node *dev) | |||
50 | int len; | 50 | int len; |
51 | struct pci_controller *hose; | 51 | struct pci_controller *hose; |
52 | struct resource rsrc; | 52 | struct resource rsrc; |
53 | int *bus_range; | 53 | const int *bus_range; |
54 | int primary = 1, has_address = 0; | 54 | int primary = 1, has_address = 0; |
55 | phys_addr_t immr = get_immrbase(); | 55 | phys_addr_t immr = get_immrbase(); |
56 | 56 | ||
@@ -60,7 +60,7 @@ int __init add_bridge(struct device_node *dev) | |||
60 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | 60 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); |
61 | 61 | ||
62 | /* Get bus range if any */ | 62 | /* Get bus range if any */ |
63 | bus_range = (int *)get_property(dev, "bus-range", &len); | 63 | bus_range = get_property(dev, "bus-range", &len); |
64 | if (bus_range == NULL || len < 2 * sizeof(int)) { | 64 | if (bus_range == NULL || len < 2 * sizeof(int)) { |
65 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | 65 | printk(KERN_WARNING "Can't get bus-range for %s, assume" |
66 | " bus 0\n", dev->full_name); | 66 | " bus 0\n", dev->full_name); |
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); |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index ebae73eb0063..839090682ab2 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -323,9 +323,9 @@ mpc86xx_hpcn_setup_arch(void) | |||
323 | 323 | ||
324 | np = of_find_node_by_type(NULL, "cpu"); | 324 | np = of_find_node_by_type(NULL, "cpu"); |
325 | if (np != 0) { | 325 | if (np != 0) { |
326 | unsigned int *fp; | 326 | const unsigned int *fp; |
327 | 327 | ||
328 | fp = (int *)get_property(np, "clock-frequency", NULL); | 328 | fp = get_property(np, "clock-frequency", NULL); |
329 | if (fp != 0) | 329 | if (fp != 0) |
330 | loops_per_jiffy = *fp / HZ; | 330 | loops_per_jiffy = *fp / HZ; |
331 | else | 331 | else |
diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c index bc5139043112..d7050c1108ff 100644 --- a/arch/powerpc/platforms/86xx/pci.c +++ b/arch/powerpc/platforms/86xx/pci.c | |||
@@ -153,7 +153,7 @@ int __init add_bridge(struct device_node *dev) | |||
153 | int len; | 153 | int len; |
154 | struct pci_controller *hose; | 154 | struct pci_controller *hose; |
155 | struct resource rsrc; | 155 | struct resource rsrc; |
156 | int *bus_range; | 156 | const int *bus_range; |
157 | int has_address = 0; | 157 | int has_address = 0; |
158 | int primary = 0; | 158 | int primary = 0; |
159 | 159 | ||
@@ -163,7 +163,7 @@ int __init add_bridge(struct device_node *dev) | |||
163 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | 163 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); |
164 | 164 | ||
165 | /* Get bus range if any */ | 165 | /* Get bus range if any */ |
166 | bus_range = (int *) get_property(dev, "bus-range", &len); | 166 | bus_range = get_property(dev, "bus-range", &len); |
167 | if (bus_range == NULL || len < 2 * sizeof(int)) | 167 | if (bus_range == NULL || len < 2 * sizeof(int)) |
168 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | 168 | printk(KERN_WARNING "Can't get bus-range for %s, assume" |
169 | " bus 0\n", dev->full_name); | 169 | " bus 0\n", dev->full_name); |
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c index d7a4fc7ca238..69c998cb4f1b 100644 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | |||
@@ -130,7 +130,7 @@ void mpc7448_hpc2_fixup_irq(struct pci_dev *dev) | |||
130 | { | 130 | { |
131 | struct pci_controller *hose; | 131 | struct pci_controller *hose; |
132 | struct device_node *node; | 132 | struct device_node *node; |
133 | unsigned int *interrupt; | 133 | const unsigned int *interrupt; |
134 | int busnr; | 134 | int busnr; |
135 | int len; | 135 | int len; |
136 | u8 slot; | 136 | u8 slot; |
@@ -147,7 +147,7 @@ void mpc7448_hpc2_fixup_irq(struct pci_dev *dev) | |||
147 | if (!node) | 147 | if (!node) |
148 | printk(KERN_ERR "No pci node found\n"); | 148 | printk(KERN_ERR "No pci node found\n"); |
149 | 149 | ||
150 | interrupt = (unsigned int *) get_property(node, "interrupt-map", &len); | 150 | interrupt = get_property(node, "interrupt-map", &len); |
151 | slot = find_slot_by_devfn(interrupt, dev->devfn); | 151 | slot = find_slot_by_devfn(interrupt, dev->devfn); |
152 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); | 152 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); |
153 | if (pin == 0 || pin > 4) | 153 | if (pin == 0 || pin > 4) |
@@ -176,9 +176,9 @@ static void __init mpc7448_hpc2_setup_arch(void) | |||
176 | 176 | ||
177 | cpu = of_find_node_by_type(NULL, "cpu"); | 177 | cpu = of_find_node_by_type(NULL, "cpu"); |
178 | if (cpu != 0) { | 178 | if (cpu != 0) { |
179 | unsigned int *fp; | 179 | const unsigned int *fp; |
180 | 180 | ||
181 | fp = (int *)get_property(cpu, "clock-frequency", NULL); | 181 | fp = get_property(cpu, "clock-frequency", NULL); |
182 | if (fp != 0) | 182 | if (fp != 0) |
183 | loops_per_jiffy = *fp / HZ; | 183 | loops_per_jiffy = *fp / HZ; |
184 | else | 184 | else |