Skip to content

Commit

Permalink
ACPI / PCI: Simplify acpi_penalize_isa_irq()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Jan 4, 2016
1 parent 37c5939 commit 0971686
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions drivers/acpi/pci_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0971686

Please sign in to comment.