Patchwork [v3,18/22] PCI, microblaze: Kill pci_root_buses in resources reservations

login
register
mail settings
Submitter Yinghai Lu
Date Jan. 27, 2013, 7:23 p.m.
Message ID <1359314629-18651-19-git-send-email-yinghai@kernel.org>
Download mbox | patch
Permalink /patch/216048/
State Superseded
Headers show

Comments

Yinghai Lu - Jan. 27, 2013, 7:23 p.m.
Replace that with hotplug-safe version iteration.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: microblaze-uclinux@itee.uq.edu.au
---
 arch/microblaze/pci/pci-common.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index a1c5b99..51f6651 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -1323,13 +1323,13 @@  static void __init pcibios_reserve_legacy_regions(struct pci_bus *bus)
 
 void __init pcibios_resource_survey(void)
 {
-	struct pci_bus *b;
+	struct pci_host_bridge *host_bridge = NULL;
 
 	/* Allocate and assign resources. If we re-assign everything, then
 	 * we skip the allocate phase
 	 */
-	list_for_each_entry(b, &pci_root_buses, node)
-		pcibios_allocate_bus_resources(b);
+	for_each_pci_host_bridge(host_bridge)
+		pcibios_allocate_bus_resources(host_bridge->bus);
 
 	pcibios_allocate_resources(0);
 	pcibios_allocate_resources(1);
@@ -1338,8 +1338,8 @@  void __init pcibios_resource_survey(void)
 	 * the low IO area and the VGA memory area if they intersect the
 	 * bus available resources to avoid allocating things on top of them
 	 */
-	list_for_each_entry(b, &pci_root_buses, node)
-		pcibios_reserve_legacy_regions(b);
+	for_each_pci_host_bridge(host_bridge)
+		pcibios_reserve_legacy_regions(host_bridge->bus);
 
 	/* Now proceed to assigning things that were left unassigned */
 	pr_debug("PCI: Assigning unassigned resources...\n");