diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-16 16:45:02 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-22 11:34:38 -0600 |
commit | 0b79ca2a800d1a2ed0386886c8358217f3371592 (patch) | |
tree | e78f58f56b3de5f22804e72c21641e78155d9c4d /drivers/parisc/dino.c | |
parent | f5725f4d3d9a69c647d6d2d504bd0ae87d9a08df (diff) | |
download | blackbird-op-linux-0b79ca2a800d1a2ed0386886c8358217f3371592.tar.gz blackbird-op-linux-0b79ca2a800d1a2ed0386886c8358217f3371592.zip |
parisc/PCI: Use list_for_each_entry() for bus->devices traversal
Replace list_for_each() + pci_dev_b() with the simpler
list_for_each_entry().
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
CC: linux-parisc@vger.kernel.org
Diffstat (limited to 'drivers/parisc/dino.c')
-rw-r--r-- | drivers/parisc/dino.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index ffddc4f64268..fb6a1fe21b93 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c @@ -477,14 +477,12 @@ dino_card_setup(struct pci_bus *bus, void __iomem *base_addr) if (ccio_allocate_resource(dino_dev->hba.dev, res, _8MB, F_EXTEND(0xf0000000UL) | _8MB, F_EXTEND(0xffffffffUL) &~ _8MB, _8MB) < 0) { - struct list_head *ln, *tmp_ln; + struct pci_dev *dev, *tmp; printk(KERN_ERR "Dino: cannot attach bus %s\n", dev_name(bus->bridge)); /* kill the bus, we can't do anything with it */ - list_for_each_safe(ln, tmp_ln, &bus->devices) { - struct pci_dev *dev = pci_dev_b(ln); - + list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list) { list_del(&dev->bus_list); } @@ -549,7 +547,6 @@ dino_card_fixup(struct pci_dev *dev) static void __init dino_fixup_bus(struct pci_bus *bus) { - struct list_head *ln; struct pci_dev *dev; struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge)); @@ -596,8 +593,7 @@ dino_fixup_bus(struct pci_bus *bus) } - list_for_each(ln, &bus->devices) { - dev = pci_dev_b(ln); + list_for_each_entry(dev, &bus->devices, bus_list) { if (is_card_dino(&dino_dev->hba.dev->id)) dino_card_fixup(dev); |