Merge branch 'origin'
[pandora-kernel.git] / arch / powerpc / kernel / pci_64.c
index ba21a6c..ba92bab 100644 (file)
@@ -53,6 +53,7 @@ EXPORT_SYMBOL(io_page_mask);
 #ifdef CONFIG_PPC_MULTIPLATFORM
 static void fixup_resource(struct resource *res, struct pci_dev *dev);
 static void do_bus_setup(struct pci_bus *bus);
+static void phbs_remap_io(void);
 #endif
 
 /* pci_io_base -- the base address from which io bars are offsets.
@@ -251,6 +252,7 @@ void pcibios_free_controller(struct pci_controller *phb)
                kfree(phb);
 }
 
+#ifndef CONFIG_PPC_ISERIES
 void __devinit pcibios_claim_one_bus(struct pci_bus *b)
 {
        struct pci_dev *dev;
@@ -271,8 +273,10 @@ void __devinit pcibios_claim_one_bus(struct pci_bus *b)
        list_for_each_entry(child_bus, &b->children, node)
                pcibios_claim_one_bus(child_bus);
 }
+#ifdef CONFIG_HOTPLUG
+EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
+#endif
 
-#ifndef CONFIG_PPC_ISERIES
 static void __init pcibios_claim_of_setup(void)
 {
        struct pci_bus *b;
@@ -585,7 +589,6 @@ void __devinit scan_phb(struct pci_controller *hose)
 #endif /* CONFIG_PPC_MULTIPLATFORM */
        if (mode == PCI_PROBE_NORMAL)
                hose->last_busno = bus->subordinate = pci_scan_child_bus(bus);
-       pci_bus_add_devices(bus);
 }
 
 static int __init pcibios_init(void)
@@ -604,8 +607,10 @@ static int __init pcibios_init(void)
        printk("PCI: Probing PCI hardware\n");
 
        /* Scan all of the recorded PCI controllers.  */
-       list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
+       list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
                scan_phb(hose);
+               pci_bus_add_devices(hose->bus);
+       }
 
 #ifndef CONFIG_PPC_ISERIES
        if (pci_probe_only)
@@ -1215,7 +1220,7 @@ int remap_bus_range(struct pci_bus *bus)
 }
 EXPORT_SYMBOL(remap_bus_range);
 
-void phbs_remap_io(void)
+static void phbs_remap_io(void)
 {
        struct pci_controller *hose, *tmp;