aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2011-12-16 07:31:54 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-19 16:13:37 -0500
commitbf684f6512223673aa78b62ea59df8be409c460d (patch)
tree2432768f5bd19abf7d57af264b5ed00e02847026
parentbc12d289e10afe0205738af30883853ed0ab6883 (diff)
de4x5/PCI: use list_for_each_entry() for bus->devices traversal
Replace open-coded list traversal with list_for_each_entry(). CC: Grant Grundler <grundler@parisc-linux.org> CC: netdev@vger.kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/dec/tulip/de4x5.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index 871bcaa7068d..3f5d3b964c28 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -2127,14 +2127,9 @@ srom_search(struct net_device *dev, struct pci_dev *pdev)
2127 u_long iobase = 0; /* Clear upper 32 bits in Alphas */ 2127 u_long iobase = 0; /* Clear upper 32 bits in Alphas */
2128 int i, j; 2128 int i, j;
2129 struct de4x5_private *lp = netdev_priv(dev); 2129 struct de4x5_private *lp = netdev_priv(dev);
2130 struct list_head *walk; 2130 struct pci_dev *this_dev;
2131
2132 list_for_each(walk, &pdev->bus_list) {
2133 struct pci_dev *this_dev = pci_dev_b(walk);
2134
2135 /* Skip the pci_bus list entry */
2136 if (list_entry(walk, struct pci_bus, devices) == pdev->bus) continue;
2137 2131
2132 list_for_each_entry(this_dev, &pdev->bus->devices, bus_list) {
2138 vendor = this_dev->vendor; 2133 vendor = this_dev->vendor;
2139 device = this_dev->device << 8; 2134 device = this_dev->device << 8;
2140 if (!(is_DC21040 || is_DC21041 || is_DC21140 || is_DC2114x)) continue; 2135 if (!(is_DC21040 || is_DC21041 || is_DC21140 || is_DC2114x)) continue;