frv/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> Acked-by: Yinghai Lu <yinghai@kernel.org> CC: David Howells <dhowells@redhat.com>
This commit is contained in:
Родитель
a7479d7446
Коммит
fd3768349b
|
@ -330,10 +330,8 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
|
||||||
pci_read_bridge_bases(bus);
|
pci_read_bridge_bases(bus);
|
||||||
|
|
||||||
if (bus->number == 0) {
|
if (bus->number == 0) {
|
||||||
struct list_head *ln;
|
|
||||||
struct pci_dev *dev;
|
struct pci_dev *dev;
|
||||||
for (ln=bus->devices.next; ln != &bus->devices; ln=ln->next) {
|
list_for_each_entry(dev, &bus->devices, bus_list) {
|
||||||
dev = pci_dev_b(ln);
|
|
||||||
if (dev->devfn == 0) {
|
if (dev->devfn == 0) {
|
||||||
dev->resource[0].start = 0;
|
dev->resource[0].start = 0;
|
||||||
dev->resource[0].end = 0;
|
dev->resource[0].end = 0;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче