summaryrefslogtreecommitdiff
path: root/drivers/acpi/pci_link.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-04 22:07:39 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-04 22:07:39 +0100
commit0971686954f9cdde502c7bce4794c5ad53ea2e66 (patch)
tree48c669399241809ab59224be0a4c6248323e82b0 /drivers/acpi/pci_link.c
parent37c5939136d7ce42b36c5d5b46f5272903a68433 (diff)
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: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Works-for: Andy Shevchenko <andy.shevchenko@gmail.com>
Diffstat (limited to 'drivers/acpi/pci_link.c')
-rw-r--r--drivers/acpi/pci_link.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 5114d8007aa0..fa2863567eed 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -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)