From: Linus Walleij Date: Thu, 27 Sep 2012 12:14:09 +0000 (+0200) Subject: pinctrl/nomadik: use irq_find_mapping() X-Git-Tag: MMI-PSA29.97-13-9~15867^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=95f0bc9bf0db600fbefda9d2157b95d5ff55e783;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Cc: Rob Herring Signed-off-by: Linus Walleij --- 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, { 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); }