]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/pci_dn.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / pci_dn.c
index 1c18953514c3d0a15aea5efce1eaf0092c40c8c1..d7d36df9c053fb36c7ccbf1c763d7e15234980a0 100644 (file)
@@ -40,8 +40,9 @@
 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 =
+               of_get_property(dn, "ibm,pci-config-space-type", NULL);
+       const u32 *regs;
        struct pci_dn *pdn;
 
        if (mem_init_done)
@@ -54,14 +55,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 = of_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 = of_get_property(dn, "linux,subbus", NULL);
                if (busp)
                        pdn->bussubno = *busp;
        }
@@ -96,10 +97,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 = of_get_property(dn, "class-code", NULL);
                class = classp ? *classp : 0;
 
                if (pre && ((ret = pre(dn, data)) != NULL))