]> git.baikalelectronics.ru Git - kernel.git/commitdiff
MIPS: OCTEON: Simplify code in octeon_irq_ciu_gpio_set_type()
authorDavid Daney <david.daney@cavium.com>
Tue, 9 Feb 2016 19:00:13 +0000 (11:00 -0800)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 12:01:41 +0000 (14:01 +0200)
Use the trigger type passed in to the function instead of reading it
back out of the irq_data.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/12501/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/cavium-octeon/octeon-irq.c

index 9b6a65b959f9000470d7debfd351d1aa8accaf06..368eb490354ced34c29a3e0b640ac66c9762b977 100644 (file)
@@ -713,7 +713,7 @@ static int octeon_irq_ciu_gpio_set_type(struct irq_data *data, unsigned int t)
        irqd_set_trigger_type(data, t);
        octeon_irq_gpio_setup(data);
 
-       if (irqd_get_trigger_type(data) & IRQ_TYPE_EDGE_BOTH)
+       if (t & IRQ_TYPE_EDGE_BOTH)
                irq_set_handler_locked(data, handle_edge_irq);
        else
                irq_set_handler_locked(data, handle_level_irq);