aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/lba_pci.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-08-16 18:45:02 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-08-22 13:34:38 -0400
commit0b79ca2a800d1a2ed0386886c8358217f3371592 (patch)
treee78f58f56b3de5f22804e72c21641e78155d9c4d /drivers/parisc/lba_pci.c
parentf5725f4d3d9a69c647d6d2d504bd0ae87d9a08df (diff)
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 4ce57c92e559..fdd63a6a62d6 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)
629static void 629static void
630lba_fixup_bus(struct pci_bus *bus) 630lba_fixup_bus(struct pci_bus *bus)
631{ 631{
632 struct list_head *ln;
633 struct pci_dev *dev; 632 struct pci_dev *dev;
634#ifdef FBB_SUPPORT 633#ifdef FBB_SUPPORT
635 u16 status; 634 u16 status;
@@ -711,10 +710,9 @@ lba_fixup_bus(struct pci_bus *bus)
711 710
712 } 711 }
713 712
714 list_for_each(ln, &bus->devices) { 713 list_for_each_entry(dev, &bus->devices, bus_list) {
715 int i; 714 int i;
716 715
717 dev = pci_dev_b(ln);
718 DBG("lba_fixup_bus() %s\n", pci_name(dev)); 716 DBG("lba_fixup_bus() %s\n", pci_name(dev));
719 717
720 /* Virtualize Device/Bridge Resources. */ 718 /* Virtualize Device/Bridge Resources. */
@@ -771,8 +769,7 @@ lba_fixup_bus(struct pci_bus *bus)
771 } 769 }
772 770
773 /* Lastly enable FBB/PERR/SERR on all devices too */ 771 /* Lastly enable FBB/PERR/SERR on all devices too */
774 list_for_each(ln, &bus->devices) { 772 list_for_each_entry(dev, &bus->devices, bus_list) {
775 dev = pci_dev_b(ln);
776 (void) pci_read_config_word(dev, PCI_COMMAND, &status); 773 (void) pci_read_config_word(dev, PCI_COMMAND, &status);
777 status |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR | fbb_enable; 774 status |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR | fbb_enable;
778 (void) pci_write_config_word(dev, PCI_COMMAND, status); 775 (void) pci_write_config_word(dev, PCI_COMMAND, status);