Commit 09716869 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

ACPI / PCI: Simplify acpi_penalize_isa_irq()

acpi_penalize_isa_irq() can be written in fewer lines of code,
so do that.  No functional change.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Works-for: Andy Shevchenko <andy.shevchenko@gmail.com>
parent 37c59391
...@@ -877,17 +877,9 @@ static int __init acpi_irq_penalty_update(char *str, int used) ...@@ -877,17 +877,9 @@ static int __init acpi_irq_penalty_update(char *str, int used)
*/ */
void acpi_penalize_isa_irq(int irq, int active) void acpi_penalize_isa_irq(int irq, int active)
{ {
int penalty; if (irq >= 0)
acpi_irq_add_penalty(irq, active ?
if (irq < 0) PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
return;
if (active)
penalty = PIRQ_PENALTY_ISA_USED;
else
penalty = PIRQ_PENALTY_PCI_USING;
acpi_irq_add_penalty(irq, penalty);
} }
bool acpi_isa_irq_available(int irq) bool acpi_isa_irq_available(int irq)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment