summaryrefslogtreecommitdiffstats
path: root/arch/ppc/kernel/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/kernel/pci.c')
-rw-r--r--arch/ppc/kernel/pci.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
index 054eee918..ec1ff3565 100644
--- a/arch/ppc/kernel/pci.c
+++ b/arch/ppc/kernel/pci.c
@@ -91,15 +91,17 @@ unsigned long resource_fixup(struct pci_dev * dev, struct resource * res,
return start;
}
-static void __init pcibios_claim_resources(struct pci_bus *bus)
+static void __init pcibios_claim_resources(struct list_head *bus_list)
{
+ struct list_head *ln, *dn;
+ struct pci_bus *bus;
struct pci_dev *dev;
int idx;
- while (bus)
- {
- for (dev=bus->devices; dev; dev=dev->sibling)
- {
+ for (ln=bus_list->next; ln != bus_list; ln=ln->next) {
+ bus = pci_bus_b(ln);
+ for (dn=bus->devices.next; dn != &bus->devices; dn=dn->next) {
+ dev = pci_dev_b(dn);
for (idx = 0; idx < PCI_NUM_RESOURCES; idx++)
{
struct resource *r = &dev->resource[idx];
@@ -114,9 +116,7 @@ static void __init pcibios_claim_resources(struct pci_bus *bus)
}
}
}
- if (bus->children)
- pcibios_claim_resources(bus->children);
- bus = bus->next;
+ pcibios_claim_resources(&bus->children);
}
}