forked from Minki/linux
microblaze: PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs
This change should be part of 89a74ecccd
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>
This commit is contained in:
parent
722154e4ca
commit
8a66da71fa
@ -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;
|
||||
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user