aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2010-02-23 12:24:31 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-23 12:43:31 -0500
commit89a74ecccd1f78e51faf6287e5c0e93a92ac096e (patch)
tree6d167d73fb2cf5bb457b0b19145fcbf81cf441ef /arch/ia64/pci
parent2adf75160b10bf3f09ed7d3d04e937f923fc557e (diff)
PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs
No functional change; this converts loops that iterate from 0 to PCI_BUS_NUM_RESOURCES through pci_bus resource[] table to use the pci_bus_for_each_resource() iterator instead. This doesn't change the way resources are stored; it merely removes dependencies on the fact that they're in a table. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/ia64/pci')
-rw-r--r--arch/ia64/pci/pci.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 783c83bb2b49..89f957ca3eb2 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -452,13 +452,12 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
452static int __devinit is_valid_resource(struct pci_dev *dev, int idx) 452static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
453{ 453{
454 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; 454 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;
455 struct resource *devr = &dev->resource[idx]; 455 struct resource *devr = &dev->resource[idx], *busr;
456 456
457 if (!dev->bus) 457 if (!dev->bus)
458 return 0; 458 return 0;
459 for (i=0; i<PCI_BUS_NUM_RESOURCES; i++) {
460 struct resource *busr = dev->bus->resource[i];
461 459
460 pci_bus_for_each_resource(dev->bus, busr, i) {
462 if (!busr || ((busr->flags ^ devr->flags) & type_mask)) 461 if (!busr || ((busr->flags ^ devr->flags) & type_mask))
463 continue; 462 continue;
464 if ((devr->start) && (devr->start >= busr->start) && 463 if ((devr->start) && (devr->start >= busr->start) &&