PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res
authorYinghai Lu <yinghai@kernel.org>
Tue, 30 Oct 2012 20:31:26 +0000 (14:31 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 3 Nov 2012 22:20:30 +0000 (16:20 -0600)
So could use assign_unassigned_bus_res pci root bus add

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/probe.c
drivers/pci/setup-bus.c

index 65f62e353719604e40f8a9da8be8cb4a676ebd8c..59cf1ba34936c7573e13285b5db41abaf1a6756d 100644 (file)
@@ -1905,6 +1905,7 @@ unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
 
        max = pci_scan_child_bus(bus);
        pci_assign_unassigned_bus_resources(bus);
+       pci_enable_bridges(bus);
        pci_bus_add_devices(bus);
 
        return max;
index 59e6c55c6d25de352d1b4aac6fdda7e26009b954..6d3591d57ea00734148e48e8fb2774bc34bb81b6 100644 (file)
@@ -1566,6 +1566,4 @@ void pci_assign_unassigned_bus_resources(struct pci_bus *bus)
        up_read(&pci_bus_sem);
        __pci_bus_assign_resources(bus, &add_list, NULL);
        BUG_ON(!list_empty(&add_list));
-
-       pci_enable_bridges(bus);
 }