aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/pci
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-04-16 03:03:00 -0400
committerMichal Simek <monstr@monstr.eu>2010-05-06 05:21:57 -0400
commit8a66da71fa84d08bef7d1678db77df77dccefa20 (patch)
tree047caefba4943562da1f0918761e7031564c7594 /arch/microblaze/pci
parent722154e4cacf015161efe60009ae9be23d492296 (diff)
microblaze: PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs
This change should be part of 89a74ecccd1f78e51faf6287e5c0e93a92ac096e Origin description: 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: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/pci')
-rw-r--r--arch/microblaze/pci/pci-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index 740bb32ec57e..5e569fa9b87b 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -1025,7 +1025,7 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
1025 1025
1026 struct pci_dev *dev = bus->self; 1026 struct pci_dev *dev = bus->self;
1027 1027
1028 for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) { 1028 pci_bus_for_each_resource(bus, res, i) {
1029 res = bus->resource[i]; 1029 res = bus->resource[i];
1030 if (!res) 1030 if (!res)
1031 continue; 1031 continue;
@@ -1228,7 +1228,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
1228 pr_debug("PCI: Allocating bus resources for %04x:%02x...\n", 1228 pr_debug("PCI: Allocating bus resources for %04x:%02x...\n",
1229 pci_domain_nr(bus), bus->number); 1229 pci_domain_nr(bus), bus->number);
1230 1230
1231 for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) { 1231 pci_bus_for_each_resource(bus, res, i) {
1232 res = bus->resource[i]; 1232 res = bus->resource[i];
1233 if (!res || !res->flags 1233 if (!res || !res->flags
1234 || res->start > res->end || res->parent) 1234 || res->start > res->end || res->parent)