summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/pnpacpi/rsparser.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2007-08-15 10:32:09 -0600
committerLen Brown <len.brown@intel.com>2007-08-24 01:27:23 -0400
commit4cec086b219224167c22dd020d3dd2d9220e1d98 (patch)
treea88e8ef2ea8b9c51cfcf259643cacb2f38e13bf7 /drivers/pnp/pnpacpi/rsparser.c
parent1e0aa9ad721349781b728ec4226876247e3fd431 (diff)
downloadtalos-obmc-linux-4cec086b219224167c22dd020d3dd2d9220e1d98.tar.gz
talos-obmc-linux-4cec086b219224167c22dd020d3dd2d9220e1d98.zip
PNPACPI: simplify irq_flags()
No need for a temporary variable; just return the flags once we know them. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Adam Belay <abelay@novell.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/pnpacpi/rsparser.c')
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 51478c084220..a0784fe5bcd8 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)
OpenPOWER on IntegriCloud