From fd3768349b0ba7bac9e102a8f146f783a03926fe Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Thu, 16 Aug 2012 16:44:18 -0600 Subject: frv/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 Acked-by: Yinghai Lu CC: David Howells --- arch/frv/mb93090-mb00/pci-vdk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch/frv') diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c index d04ed14bbf0c..71e9bcf58105 100644 --- a/arch/frv/mb93090-mb00/pci-vdk.c +++ b/arch/frv/mb93090-mb00/pci-vdk.c @@ -330,10 +330,8 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) pci_read_bridge_bases(bus); if (bus->number == 0) { - struct list_head *ln; struct pci_dev *dev; - 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->devfn == 0) { dev->resource[0].start = 0; dev->resource[0].end = 0; -- cgit v1.2.3