diff options
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 51478c08422..a0784fe5bcd 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c @@ -34,20 +34,17 @@ */ static int irq_flags(int triggering, int polarity) { - int flag; - if (triggering == ACPI_LEVEL_SENSITIVE) { if (polarity == ACPI_ACTIVE_LOW) - flag = IORESOURCE_IRQ_LOWLEVEL; + return IORESOURCE_IRQ_LOWLEVEL; else - flag = IORESOURCE_IRQ_HIGHLEVEL; + return IORESOURCE_IRQ_HIGHLEVEL; } else { if (polarity == ACPI_ACTIVE_LOW) - flag = IORESOURCE_IRQ_LOWEDGE; + return IORESOURCE_IRQ_LOWEDGE; else - flag = IORESOURCE_IRQ_HIGHEDGE; + return IORESOURCE_IRQ_HIGHEDGE; } - return flag; } static void decode_irq_flags(int flag, int *triggering, int *polarity) |