]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/pci_dn.c
autofs4: fix symlink name allocation
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / pci_dn.c
index d7d36df9c053fb36c7ccbf1c763d7e15234980a0..1c67de52e3ce5d44e2a91c08b1cedd661e240f4a 100644 (file)
@@ -23,8 +23,6 @@
 #include <linux/pci.h>
 #include <linux/string.h>
 #include <linux/init.h>
-#include <linux/slab.h>
-#include <linux/bootmem.h>
 
 #include <asm/io.h>
 #include <asm/prom.h>
@@ -45,10 +43,7 @@ static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
        const u32 *regs;
        struct pci_dn *pdn;
 
-       if (mem_init_done)
-               pdn = kmalloc(sizeof(*pdn), GFP_KERNEL);
-       else
-               pdn = alloc_bootmem(sizeof(*pdn));
+       pdn = alloc_maybe_bootmem(sizeof(*pdn), GFP_KERNEL);
        if (pdn == NULL)
                return NULL;
        memset(pdn, 0, sizeof(*pdn));
@@ -61,11 +56,6 @@ static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
                pdn->busno = (regs[0] >> 16) & 0xff;
                pdn->devfn = (regs[0] >> 8) & 0xff;
        }
-       if (firmware_has_feature(FW_FEATURE_ISERIES)) {
-               const u32 *busp = of_get_property(dn, "linux,subbus", NULL);
-               if (busp)
-                       pdn->bussubno = *busp;
-       }
 
        pdn->pci_ext_config_space = (type && *type == 1);
        return NULL;
@@ -138,7 +128,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
  */
 void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb)
 {
-       struct device_node * dn = (struct device_node *) phb->arch_data;
+       struct device_node *dn = phb->dn;
        struct pci_dn *pdn;
 
        /* PHB nodes themselves must not match */