From: Bjorn Helgaas Date: Tue, 9 Dec 2008 23:11:57 +0000 (-0700) Subject: x86/PCI: minor logic simplications X-Git-Tag: v2.6.29-rc1~181^2~61 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=12b955ff63db0b75cfc2d4939696c57b31891ec6;p=linux-2.6-omap-h63xx.git x86/PCI: minor logic simplications Test "pin" immediately to simplify the subsequent code. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: hpa@zytor.com Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes --- diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index cc9d5e25406..e1d605bfeb4 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c @@ -1041,6 +1041,9 @@ static void __init pcibios_fixup_irqs(void) dev = NULL; while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); + if (!pin) + continue; + #ifdef CONFIG_X86_IO_APIC /* * Recalculate IRQ numbers if we use the I/O APIC. @@ -1048,9 +1051,6 @@ static void __init pcibios_fixup_irqs(void) if (io_apic_assign_pci_irqs) { int irq; - if (!pin) - continue; - /* * interrupt pins are numbered starting from 1 */ @@ -1091,7 +1091,7 @@ static void __init pcibios_fixup_irqs(void) /* * Still no IRQ? Try to lookup one... */ - if (pin && !dev->irq) + if (!dev->irq) pcibios_lookup_irq(dev, 0); } }