summaryrefslogtreecommitdiffstats
path: root/drivers/parisc/lba_pci.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-08-16 16:45:02 -0600
committerBjorn Helgaas <bhelgaas@google.com>2012-08-22 11:34:38 -0600
commit0b79ca2a800d1a2ed0386886c8358217f3371592 (patch)
treee78f58f56b3de5f22804e72c21641e78155d9c4d /drivers/parisc/lba_pci.c
parentf5725f4d3d9a69c647d6d2d504bd0ae87d9a08df (diff)
downloadop-kernel-dev-0b79ca2a800d1a2ed0386886c8358217f3371592.zip
op-kernel-dev-0b79ca2a800d1a2ed0386886c8358217f3371592.tar.gz
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/lba_pci.c')
-rw-r--r--drivers/parisc/lba_pci.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index 4ce57c9..fdd63a6 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -629,7 +629,6 @@ truncate_pat_collision(struct resource *root, struct resource *new)
static void
lba_fixup_bus(struct pci_bus *bus)
{
- struct list_head *ln;
struct pci_dev *dev;
#ifdef FBB_SUPPORT
u16 status;
@@ -711,10 +710,9 @@ lba_fixup_bus(struct pci_bus *bus)
}
- list_for_each(ln, &bus->devices) {
+ list_for_each_entry(dev, &bus->devices, bus_list) {
int i;
- dev = pci_dev_b(ln);
DBG("lba_fixup_bus() %s\n", pci_name(dev));
/* Virtualize Device/Bridge Resources. */
@@ -771,8 +769,7 @@ lba_fixup_bus(struct pci_bus *bus)
}
/* Lastly enable FBB/PERR/SERR on all devices too */
- list_for_each(ln, &bus->devices) {
- dev = pci_dev_b(ln);
+ list_for_each_entry(dev, &bus->devices, bus_list) {
(void) pci_read_config_word(dev, PCI_COMMAND, &status);
status |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR | fbb_enable;
(void) pci_write_config_word(dev, PCI_COMMAND, status);
OpenPOWER on IntegriCloud