pinctrl/nomadik: use irq_find_mapping()
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 27 Sep 2012 12:14:09 +0000 (14:14 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 28 Sep 2012 07:31:26 +0000 (09:31 +0200)
The code was using a homegrown method of looking up the offset
from the irq domain, not to be encouraged. Use the proper
irq_find_mapping() call instead.

Cc: Lee Jones <lee.jones@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-nomadik.c

index fae10b3115519087852cb4f6b6a356781f84022a..6030a513f3c488506de4d80cd3cfae6c25ce69b2 100644 (file)
@@ -827,16 +827,14 @@ static void __nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc,
 {
        struct nmk_gpio_chip *nmk_chip;
        struct irq_chip *host_chip = irq_get_chip(irq);
-       unsigned int first_irq;
 
        chained_irq_enter(host_chip, desc);
 
        nmk_chip = irq_get_handler_data(irq);
-       first_irq = nmk_chip->domain->revmap_data.legacy.first_irq;
        while (status) {
                int bit = __ffs(status);
 
-               generic_handle_irq(first_irq + bit);
+               generic_handle_irq(irq_find_mapping(nmk_chip->domain, bit));
                status &= ~BIT(bit);
        }
 
This page took 0.025004 seconds and 5 git commands to generate.