Skip to content

Commit

Permalink
microblaze: PCI: add pci_bus_for_each_resource(), remove direct bus->…
Browse files Browse the repository at this point in the history
…resource[] refs

This change should be part of 89a74ec

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>
  • Loading branch information
Michal Simek committed May 6, 2010
1 parent 722154e commit 8a66da7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/microblaze/pci/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)

struct pci_dev *dev = bus->self;

for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
pci_bus_for_each_resource(bus, res, i) {
res = bus->resource[i];
if (!res)
continue;
Expand Down Expand Up @@ -1228,7 +1228,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
pr_debug("PCI: Allocating bus resources for %04x:%02x...\n",
pci_domain_nr(bus), bus->number);

for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
pci_bus_for_each_resource(bus, res, i) {
res = bus->resource[i];
if (!res || !res->flags
|| res->start > res->end || res->parent)
Expand Down

0 comments on commit 8a66da7

Please sign in to comment.