diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2010-02-23 10:24:31 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-02-23 09:43:31 -0800 |
commit | 89a74ecccd1f78e51faf6287e5c0e93a92ac096e (patch) | |
tree | 6d167d73fb2cf5bb457b0b19145fcbf81cf441ef /arch/mn10300 | |
parent | 2adf75160b10bf3f09ed7d3d04e937f923fc557e (diff) | |
download | blackbird-op-linux-89a74ecccd1f78e51faf6287e5c0e93a92ac096e.tar.gz blackbird-op-linux-89a74ecccd1f78e51faf6287e5c0e93a92ac096e.zip |
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/mn10300')
-rw-r--r-- | arch/mn10300/unit-asb2305/pci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c index 2cb7e75ba1c0..6d8720a0a599 100644 --- a/arch/mn10300/unit-asb2305/pci.c +++ b/arch/mn10300/unit-asb2305/pci.c @@ -331,12 +331,10 @@ static int __init pci_check_direct(void) static int __devinit is_valid_resource(struct pci_dev *dev, int idx) { unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; - struct resource *devr = &dev->resource[idx]; + struct resource *devr = &dev->resource[idx], *busr; if (dev->bus) { - for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { - struct resource *busr = dev->bus->resource[i]; - + pci_bus_for_each_resource(dev->bus, busr, i) { if (!busr || (busr->flags ^ devr->flags) & type_mask) continue; |