aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/pci_dn.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-09-23 14:34:10 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-09-23 14:34:10 +0200
commit919251758195919ae3568021bc221e4f8c4b20eb (patch)
tree81137a037ff8e6c91cc8de72d568275605c653c5 /arch/powerpc/kernel/pci_dn.c
parentc394f1eafef61c6666f5876afde6110a276c4c9f (diff)
parent3eeab61aa3ddd3c0bedb7449ada1599de22fdb5a (diff)
Merge branch 'mainline' into upstream-linus
Diffstat (limited to 'arch/powerpc/kernel/pci_dn.c')
-rw-r--r--arch/powerpc/kernel/pci_dn.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
index 1c18953514c..68df018dae0 100644
--- a/arch/powerpc/kernel/pci_dn.c
+++ b/arch/powerpc/kernel/pci_dn.c
@@ -40,8 +40,8 @@
static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
{
struct pci_controller *phb = data;
- int *type = (int *)get_property(dn, "ibm,pci-config-space-type", NULL);
- u32 *regs;
+ const int *type = get_property(dn, "ibm,pci-config-space-type", NULL);
+ const u32 *regs;
struct pci_dn *pdn;
if (mem_init_done)
@@ -54,14 +54,14 @@ static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
dn->data = pdn;
pdn->node = dn;
pdn->phb = phb;
- regs = (u32 *)get_property(dn, "reg", NULL);
+ regs = get_property(dn, "reg", NULL);
if (regs) {
/* First register entry is addr (00BBSS00) */
pdn->busno = (regs[0] >> 16) & 0xff;
pdn->devfn = (regs[0] >> 8) & 0xff;
}
if (firmware_has_feature(FW_FEATURE_ISERIES)) {
- u32 *busp = (u32 *)get_property(dn, "linux,subbus", NULL);
+ const u32 *busp = get_property(dn, "linux,subbus", NULL);
if (busp)
pdn->bussubno = *busp;
}
@@ -96,10 +96,11 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
/* We started with a phb, iterate all childs */
for (dn = start->child; dn; dn = nextdn) {
- u32 *classp, class;
+ const u32 *classp;
+ u32 class;
nextdn = NULL;
- classp = (u32 *)get_property(dn, "class-code", NULL);
+ classp = get_property(dn, "class-code", NULL);
class = classp ? *classp : 0;
if (pre && ((ret = pre(dn, data)) != NULL))