diff options
| author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-12-09 18:11:57 -0500 |
|---|---|---|
| committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-01-07 14:12:49 -0500 |
| commit | 12b955ff63db0b75cfc2d4939696c57b31891ec6 (patch) | |
| tree | 8b5d2f052cdd398cf40b2f601886cfaf962c4b07 | |
| parent | f672c392b9c61bcdfb1247561d404b2c3ed4b0b3 (diff) | |
x86/PCI: minor logic simplications
Test "pin" immediately to simplify the subsequent code.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: hpa@zytor.com
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| -rw-r--r-- | arch/x86/pci/irq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index cc9d5e254060..e1d605bfeb47 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
| @@ -1041,6 +1041,9 @@ static void __init pcibios_fixup_irqs(void) | |||
| 1041 | dev = NULL; | 1041 | dev = NULL; |
| 1042 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | 1042 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { |
| 1043 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); | 1043 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); |
| 1044 | if (!pin) | ||
| 1045 | continue; | ||
| 1046 | |||
| 1044 | #ifdef CONFIG_X86_IO_APIC | 1047 | #ifdef CONFIG_X86_IO_APIC |
| 1045 | /* | 1048 | /* |
| 1046 | * Recalculate IRQ numbers if we use the I/O APIC. | 1049 | * Recalculate IRQ numbers if we use the I/O APIC. |
| @@ -1048,9 +1051,6 @@ static void __init pcibios_fixup_irqs(void) | |||
| 1048 | if (io_apic_assign_pci_irqs) { | 1051 | if (io_apic_assign_pci_irqs) { |
| 1049 | int irq; | 1052 | int irq; |
| 1050 | 1053 | ||
| 1051 | if (!pin) | ||
| 1052 | continue; | ||
| 1053 | |||
| 1054 | /* | 1054 | /* |
| 1055 | * interrupt pins are numbered starting from 1 | 1055 | * interrupt pins are numbered starting from 1 |
| 1056 | */ | 1056 | */ |
| @@ -1091,7 +1091,7 @@ static void __init pcibios_fixup_irqs(void) | |||
| 1091 | /* | 1091 | /* |
| 1092 | * Still no IRQ? Try to lookup one... | 1092 | * Still no IRQ? Try to lookup one... |
| 1093 | */ | 1093 | */ |
| 1094 | if (pin && !dev->irq) | 1094 | if (!dev->irq) |
| 1095 | pcibios_lookup_irq(dev, 0); | 1095 | pcibios_lookup_irq(dev, 0); |
| 1096 | } | 1096 | } |
| 1097 | } | 1097 | } |
