ChangeSet 1.1254.4.43, 2003/06/04 13:33:49-07:00, greg@kroah.com [PATCH] PCI: remove usage of pci_for_each_dev() in arch/i386/pci/irq.c arch/i386/pci/irq.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff -Nru a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c --- a/arch/i386/pci/irq.c Wed Jun 4 18:08:53 2003 +++ b/arch/i386/pci/irq.c Wed Jun 4 18:08:53 2003 @@ -573,7 +573,7 @@ int irq = 0; u32 mask; struct irq_router *r = pirq_router; - struct pci_dev *dev2; + struct pci_dev *dev2 = NULL; char *msg = NULL; /* Find IRQ pin */ @@ -665,7 +665,7 @@ printk(KERN_INFO "PCI: %s IRQ %d for device %s\n", msg, irq, dev->slot_name); /* Update IRQ for all devices with the same pirq value */ - pci_for_each_dev(dev2) { + while ((dev2 = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev2)) != NULL) { pci_read_config_byte(dev2, PCI_INTERRUPT_PIN, &pin); if (!pin) continue; @@ -693,11 +693,11 @@ static void __init pcibios_fixup_irqs(void) { - struct pci_dev *dev; + struct pci_dev *dev = NULL; u8 pin; DBG("PCI: IRQ fixup\n"); - pci_for_each_dev(dev) { + while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { /* * If the BIOS has set an out of range IRQ number, just ignore it. * Also keep track of which IRQ's are already in use. @@ -712,7 +712,8 @@ pirq_penalty[dev->irq]++; } - pci_for_each_dev(dev) { + dev = NULL; + while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); #ifdef CONFIG_X86_IO_APIC /*