diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2012-09-27 08:14:09 -0400 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2012-09-28 03:31:26 -0400 |
| commit | 95f0bc9bf0db600fbefda9d2157b95d5ff55e783 (patch) | |
| tree | 55f311babceacd23ed477ab5618afefdcb3c718d | |
| parent | 6fd4011e165e4a28c06a044c919161e657138181 (diff) | |
pinctrl/nomadik: use irq_find_mapping()
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>
| -rw-r--r-- | drivers/pinctrl/pinctrl-nomadik.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index fae10b311551..6030a513f3c4 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c | |||
| @@ -827,16 +827,14 @@ static void __nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc, | |||
| 827 | { | 827 | { |
| 828 | struct nmk_gpio_chip *nmk_chip; | 828 | struct nmk_gpio_chip *nmk_chip; |
| 829 | struct irq_chip *host_chip = irq_get_chip(irq); | 829 | struct irq_chip *host_chip = irq_get_chip(irq); |
| 830 | unsigned int first_irq; | ||
| 831 | 830 | ||
| 832 | chained_irq_enter(host_chip, desc); | 831 | chained_irq_enter(host_chip, desc); |
| 833 | 832 | ||
| 834 | nmk_chip = irq_get_handler_data(irq); | 833 | nmk_chip = irq_get_handler_data(irq); |
| 835 | first_irq = nmk_chip->domain->revmap_data.legacy.first_irq; | ||
| 836 | while (status) { | 834 | while (status) { |
| 837 | int bit = __ffs(status); | 835 | int bit = __ffs(status); |
| 838 | 836 | ||
| 839 | generic_handle_irq(first_irq + bit); | 837 | generic_handle_irq(irq_find_mapping(nmk_chip->domain, bit)); |
| 840 | status &= ~BIT(bit); | 838 | status &= ~BIT(bit); |
| 841 | } | 839 | } |
| 842 | 840 | ||
