Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95f0bc9b authored by Linus Walleij's avatar Linus Walleij
Browse files

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: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 6fd4011e
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -827,16 +827,14 @@ static void __nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc,
{
{
	struct nmk_gpio_chip *nmk_chip;
	struct nmk_gpio_chip *nmk_chip;
	struct irq_chip *host_chip = irq_get_chip(irq);
	struct irq_chip *host_chip = irq_get_chip(irq);
	unsigned int first_irq;


	chained_irq_enter(host_chip, desc);
	chained_irq_enter(host_chip, desc);


	nmk_chip = irq_get_handler_data(irq);
	nmk_chip = irq_get_handler_data(irq);
	first_irq = nmk_chip->domain->revmap_data.legacy.first_irq;
	while (status) {
	while (status) {
		int bit = __ffs(status);
		int bit = __ffs(status);


		generic_handle_irq(first_irq + bit);
		generic_handle_irq(irq_find_mapping(nmk_chip->domain, bit));
		status &= ~BIT(bit);
		status &= ~BIT(bit);
	}
	}