ACPI / PCI: Simplify acpi_penalize_isa_irq()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 4 Jan 2016 21:07:39 +0000 (22:07 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 4 Jan 2016 21:07:39 +0000 (22:07 +0100)
acpi_penalize_isa_irq() can be written in fewer lines of code,
so do that.  No functional change.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Works-for: Andy Shevchenko <andy.shevchenko@gmail.com>

drivers/acpi/pci_link.c

index 5114d8007aa004b0e51ff1b8c55f963cd19513f5..fa2863567eed3c944c884245118c0d55d5ec5fdd 100644 (file)
@@ -877,17 +877,9 @@ static int __init acpi_irq_penalty_update(char *str, int used)
  */
 void acpi_penalize_isa_irq(int irq, int active)
 {
-       int penalty;
-
-       if (irq < 0)
-               return;
-
-       if (active)
-               penalty = PIRQ_PENALTY_ISA_USED;
-       else
-               penalty = PIRQ_PENALTY_PCI_USING;
-
-       acpi_irq_add_penalty(irq, penalty);
+       if (irq >= 0)
+               acpi_irq_add_penalty(irq, active ?
+                       PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
 }
 
 bool acpi_isa_irq_available(int irq)