diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2011-12-16 17:31:39 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-02-20 12:33:19 -0500 |
commit | f79eaeb108499e10fa604103737e7273404e76a4 (patch) | |
tree | 785b007afc5cdd49e145e292faee12a051243597 /arch/mips | |
parent | 43ca4957a15a120d0822a60a22998dbb41bbf075 (diff) |
MIPS: 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 <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3200/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/pci/pci.c | 5 | ||||
-rw-r--r-- | arch/mips/pmc-sierra/yosemite/ht-irq.c | 10 |
2 files changed, 1 insertions, 14 deletions
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index aec2b111d35b..15521505ebe8 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
@@ -279,7 +279,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
279 | { | 279 | { |
280 | /* Propagate hose info into the subordinate devices. */ | 280 | /* Propagate hose info into the subordinate devices. */ |
281 | 281 | ||
282 | struct list_head *ln; | ||
283 | struct pci_dev *dev = bus->self; | 282 | struct pci_dev *dev = bus->self; |
284 | 283 | ||
285 | if (pci_probe_only && dev && | 284 | if (pci_probe_only && dev && |
@@ -288,9 +287,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
288 | pcibios_fixup_device_resources(dev, bus); | 287 | pcibios_fixup_device_resources(dev, bus); |
289 | } | 288 | } |
290 | 289 | ||
291 | for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { | 290 | list_for_each_entry(dev, &bus->devices, bus_list) { |
292 | dev = pci_dev_b(ln); | ||
293 | |||
294 | if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) | 291 | if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) |
295 | pcibios_fixup_device_resources(dev, bus); | 292 | pcibios_fixup_device_resources(dev, bus); |
296 | } | 293 | } |
diff --git a/arch/mips/pmc-sierra/yosemite/ht-irq.c b/arch/mips/pmc-sierra/yosemite/ht-irq.c index 86b98e98fb4f..62ead6601c69 100644 --- a/arch/mips/pmc-sierra/yosemite/ht-irq.c +++ b/arch/mips/pmc-sierra/yosemite/ht-irq.c | |||
@@ -35,16 +35,6 @@ | |||
35 | */ | 35 | */ |
36 | void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus) | 36 | void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus) |
37 | { | 37 | { |
38 | struct pci_bus *current_bus = bus; | ||
39 | struct pci_dev *devices; | ||
40 | struct list_head *devices_link; | ||
41 | |||
42 | list_for_each(devices_link, &(current_bus->devices)) { | ||
43 | devices = pci_dev_b(devices_link); | ||
44 | if (devices == NULL) | ||
45 | continue; | ||
46 | } | ||
47 | |||
48 | /* | 38 | /* |
49 | * PLX and SPKT related changes go here | 39 | * PLX and SPKT related changes go here |
50 | */ | 40 | */ |