提交 8a66da71 编写于 作者: M Michal Simek

microblaze: PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs

This change should be part of 89a74ecc

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: NMichal Simek <monstr@monstr.eu>
上级 722154e4
...@@ -1025,7 +1025,7 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) ...@@ -1025,7 +1025,7 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
struct pci_dev *dev = bus->self; 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]; res = bus->resource[i];
if (!res) if (!res)
continue; continue;
...@@ -1228,7 +1228,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus) ...@@ -1228,7 +1228,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
pr_debug("PCI: Allocating bus resources for %04x:%02x...\n", pr_debug("PCI: Allocating bus resources for %04x:%02x...\n",
pci_domain_nr(bus), bus->number); 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]; res = bus->resource[i];
if (!res || !res->flags if (!res || !res->flags
|| res->start > res->end || res->parent) || res->start > res->end || res->parent)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册