diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/pci_link.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 89f3b2abfdc7..cf47805a7448 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -849,7 +849,7 @@ static int __init acpi_irq_penalty_update(char *str, int used) | |||
849 | if (irq < 0) | 849 | if (irq < 0) |
850 | continue; | 850 | continue; |
851 | 851 | ||
852 | if (irq >= ACPI_MAX_IRQS) | 852 | if (irq >= ARRAY_SIZE(acpi_irq_penalty)) |
853 | continue; | 853 | continue; |
854 | 854 | ||
855 | if (used) | 855 | if (used) |
@@ -872,10 +872,12 @@ static int __init acpi_irq_penalty_update(char *str, int used) | |||
872 | */ | 872 | */ |
873 | void acpi_penalize_isa_irq(int irq, int active) | 873 | void acpi_penalize_isa_irq(int irq, int active) |
874 | { | 874 | { |
875 | if (active) | 875 | if (irq >= 0 && irq < ARRAY_SIZE(acpi_irq_penalty)) { |
876 | acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED; | 876 | if (active) |
877 | else | 877 | acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED; |
878 | acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING; | 878 | else |
879 | acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING; | ||
880 | } | ||
879 | } | 881 | } |
880 | 882 | ||
881 | /* | 883 | /* |