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 | c4c7cba90cf9f180a2c45f7e54143f786360f3dd (patch) | |
tree | 293afc1cc7ae9fa206ad85d2fc6d4eacd817a37c | |
parent | 954a46e2d5aec6f59976ddeb1d232b486e59b54a (diff) |
[POWERPC] iseries: 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.
iseries platform changes.
Built for iseries_defconfig
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/platforms/iseries/iommu.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/pci.c | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index 2c3dbcd4613c..f4cbbcf8773a 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -179,7 +179,7 @@ void iommu_devnode_init_iSeries(struct device_node *dn) | |||
179 | { | 179 | { |
180 | struct iommu_table *tbl; | 180 | struct iommu_table *tbl; |
181 | struct pci_dn *pdn = PCI_DN(dn); | 181 | struct pci_dn *pdn = PCI_DN(dn); |
182 | u32 *lsn = (u32 *)get_property(dn, "linux,logical-slot-number", NULL); | 182 | const u32 *lsn = get_property(dn, "linux,logical-slot-number", NULL); |
183 | 183 | ||
184 | BUG_ON(lsn == NULL); | 184 | BUG_ON(lsn == NULL); |
185 | 185 | ||
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 35bcc98111f5..f4d427a7bb2d 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -176,12 +176,12 @@ void iSeries_pcibios_init(void) | |||
176 | } | 176 | } |
177 | while ((node = of_get_next_child(root, node)) != NULL) { | 177 | while ((node = of_get_next_child(root, node)) != NULL) { |
178 | HvBusNumber bus; | 178 | HvBusNumber bus; |
179 | u32 *busp; | 179 | const u32 *busp; |
180 | 180 | ||
181 | if ((node->type == NULL) || (strcmp(node->type, "pci") != 0)) | 181 | if ((node->type == NULL) || (strcmp(node->type, "pci") != 0)) |
182 | continue; | 182 | continue; |
183 | 183 | ||
184 | busp = (u32 *)get_property(node, "bus-range", NULL); | 184 | busp = get_property(node, "bus-range", NULL); |
185 | if (busp == NULL) | 185 | if (busp == NULL) |
186 | continue; | 186 | continue; |
187 | bus = *busp; | 187 | bus = *busp; |
@@ -221,10 +221,9 @@ void __init iSeries_pci_final_fixup(void) | |||
221 | 221 | ||
222 | if (node != NULL) { | 222 | if (node != NULL) { |
223 | struct pci_dn *pdn = PCI_DN(node); | 223 | struct pci_dn *pdn = PCI_DN(node); |
224 | u32 *agent; | 224 | const u32 *agent; |
225 | 225 | ||
226 | agent = (u32 *)get_property(node, "linux,agent-id", | 226 | agent = get_property(node, "linux,agent-id", NULL); |
227 | NULL); | ||
228 | if ((pdn != NULL) && (agent != NULL)) { | 227 | if ((pdn != NULL) && (agent != NULL)) { |
229 | u8 irq = iSeries_allocate_IRQ(pdn->busno, 0, | 228 | u8 irq = iSeries_allocate_IRQ(pdn->busno, 0, |
230 | pdn->bussubno); | 229 | pdn->bussubno); |