diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2011-12-16 22:31:39 (GMT) |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-02-20 17:33:19 (GMT) |
commit | f79eaeb108499e10fa604103737e7273404e76a4 (patch) | |
tree | 785b007afc5cdd49e145e292faee12a051243597 /arch/mips/pci | |
parent | 43ca4957a15a120d0822a60a22998dbb41bbf075 (diff) | |
download | linux-f79eaeb108499e10fa604103737e7273404e76a4.tar.xz |
MIPS: PCI: use list_for_each_entry() for bus->devices traversal
Replace open-coded list traversal with list_for_each_entry().
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3200/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/pci')
-rw-r--r-- | arch/mips/pci/pci.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index aec2b11..1552150 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c @@ -279,7 +279,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) { /* Propagate hose info into the subordinate devices. */ - struct list_head *ln; struct pci_dev *dev = bus->self; if (pci_probe_only && dev && @@ -288,9 +287,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) pcibios_fixup_device_resources(dev, bus); } - for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { - dev = pci_dev_b(ln); - + list_for_each_entry(dev, &bus->devices, bus_list) { if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) pcibios_fixup_device_resources(dev, bus); } |