diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2006-07-12 01:40:05 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 01:55:05 -0400 |
commit | ae6b4101e53dcf8a41f3432dacca9d3eb34e9cc3 (patch) | |
tree | 9144d6ef4e0fcb30900eef1e2b67904fb7266039 /arch/powerpc/platforms/chrp/pci.c | |
parent | c61c27d58af61e5b78257019b173732c29ce0c64 (diff) |
[POWERPC] chrp: 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.
chrp platform changes.
Built for chrp32_defconfig
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/chrp/pci.c')
-rw-r--r-- | arch/powerpc/platforms/chrp/pci.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 6d7ac649b45e..0f4340506c75 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -214,11 +214,11 @@ void __init | |||
214 | chrp_find_bridges(void) | 214 | chrp_find_bridges(void) |
215 | { | 215 | { |
216 | struct device_node *dev; | 216 | struct device_node *dev; |
217 | int *bus_range; | 217 | const int *bus_range; |
218 | int len, index = -1; | 218 | int len, index = -1; |
219 | struct pci_controller *hose; | 219 | struct pci_controller *hose; |
220 | unsigned int *dma; | 220 | const unsigned int *dma; |
221 | char *model, *machine; | 221 | const char *model, *machine; |
222 | int is_longtrail = 0, is_mot = 0, is_pegasos = 0; | 222 | int is_longtrail = 0, is_mot = 0, is_pegasos = 0; |
223 | struct device_node *root = find_path_device("/"); | 223 | struct device_node *root = find_path_device("/"); |
224 | struct resource r; | 224 | struct resource r; |
@@ -246,7 +246,7 @@ chrp_find_bridges(void) | |||
246 | dev->full_name); | 246 | dev->full_name); |
247 | continue; | 247 | continue; |
248 | } | 248 | } |
249 | bus_range = (int *) get_property(dev, "bus-range", &len); | 249 | bus_range = get_property(dev, "bus-range", &len); |
250 | if (bus_range == NULL || len < 2 * sizeof(int)) { | 250 | if (bus_range == NULL || len < 2 * sizeof(int)) { |
251 | printk(KERN_WARNING "Can't get bus-range for %s\n", | 251 | printk(KERN_WARNING "Can't get bus-range for %s\n", |
252 | dev->full_name); | 252 | dev->full_name); |
@@ -312,8 +312,7 @@ chrp_find_bridges(void) | |||
312 | 312 | ||
313 | /* check the first bridge for a property that we can | 313 | /* check the first bridge for a property that we can |
314 | use to set pci_dram_offset */ | 314 | use to set pci_dram_offset */ |
315 | dma = (unsigned int *) | 315 | dma = get_property(dev, "ibm,dma-ranges", &len); |
316 | get_property(dev, "ibm,dma-ranges", &len); | ||
317 | if (index == 0 && dma != NULL && len >= 6 * sizeof(*dma)) { | 316 | if (index == 0 && dma != NULL && len >= 6 * sizeof(*dma)) { |
318 | pci_dram_offset = dma[2] - dma[3]; | 317 | pci_dram_offset = dma[2] - dma[3]; |
319 | printk("pci_dram_offset = %lx\n", pci_dram_offset); | 318 | printk("pci_dram_offset = %lx\n", pci_dram_offset); |