mirror of https://gitee.com/openkylin/linux.git
gpio: pxa: remove gpio_to_irq() from hw irq handlers
gpio_to_irq() API expected to be used by GPIO consumers and not drivers and there are no guarantee that its gpiolib implementation is irq safe. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
dc749a09ea
commit
64fcf3b32e
|
@ -451,7 +451,9 @@ static irqreturn_t pxa_gpio_demux_handler(int in_irq, void *d)
|
||||||
for_each_set_bit(n, &gedr, BITS_PER_LONG) {
|
for_each_set_bit(n, &gedr, BITS_PER_LONG) {
|
||||||
loop = 1;
|
loop = 1;
|
||||||
|
|
||||||
generic_handle_irq(gpio_to_irq(gpio + n));
|
generic_handle_irq(
|
||||||
|
irq_find_mapping(pchip->irqdomain,
|
||||||
|
gpio + n));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
handled += loop;
|
handled += loop;
|
||||||
|
@ -465,9 +467,9 @@ static irqreturn_t pxa_gpio_direct_handler(int in_irq, void *d)
|
||||||
struct pxa_gpio_chip *pchip = d;
|
struct pxa_gpio_chip *pchip = d;
|
||||||
|
|
||||||
if (in_irq == pchip->irq0) {
|
if (in_irq == pchip->irq0) {
|
||||||
generic_handle_irq(gpio_to_irq(0));
|
generic_handle_irq(irq_find_mapping(pchip->irqdomain, 0));
|
||||||
} else if (in_irq == pchip->irq1) {
|
} else if (in_irq == pchip->irq1) {
|
||||||
generic_handle_irq(gpio_to_irq(1));
|
generic_handle_irq(irq_find_mapping(pchip->irqdomain, 1));
|
||||||
} else {
|
} else {
|
||||||
pr_err("%s() unknown irq %d\n", __func__, in_irq);
|
pr_err("%s() unknown irq %d\n", __func__, in_irq);
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
|
|
Loading…
Reference in New Issue