aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-max732x.c
diff options
context:
space:
mode:
authorSemen Protsenko <semen.protsenko@globallogic.com>2015-04-22 09:20:41 -0400
committerLinus Walleij <linus.walleij@linaro.org>2015-05-06 09:08:54 -0400
commit606f13e9efa0892561e7c471242e4ad0bcaf6ecb (patch)
tree1188ee4864fc0447d8bab1b2d591c5b40fd37d96 /drivers/gpio/gpio-max732x.c
parent68689dbf35e13fc20928ba3a0b959d28c6281e9e (diff)
gpio: max732x: Fix irq-events handler
MAX732X clears all pending interrupts on I2C read (when interrupts register is being read). Driver doesn't need to send any ACKs when interrupt was handled. So replace handle_edge_irq() with handle_simple_irq(). Using handle_edge_irq() (w/o .irq_ack callback set) may lead to NULL pointer dereference in some cases. E.g. this was observed on hibernation process: Unable to handle kernel NULL pointer dereference at virtual address 0 Backtrace: (handle_edge_irq) from (resend_irqs) (resend_irqs) from (tasklet_action) (tasklet_action) from (__do_softirq) (__do_softirq) from (run_ksoftirqd) (run_ksoftirqd) from (smpboot_thread_fn) (smpboot_thread_fn) from (kthread) (kthread) from (ret_from_fork) Signed-off-by: Semen Protsenko <semen.protsenko@globallogic.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-max732x.c')
-rw-r--r--drivers/gpio/gpio-max732x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c
index 857907aecec3..aed4ca9338bc 100644
--- a/drivers/gpio/gpio-max732x.c
+++ b/drivers/gpio/gpio-max732x.c
@@ -528,7 +528,7 @@ static int max732x_irq_setup(struct max732x_chip *chip,
528 ret = gpiochip_irqchip_add(&chip->gpio_chip, 528 ret = gpiochip_irqchip_add(&chip->gpio_chip,
529 &max732x_irq_chip, 529 &max732x_irq_chip,
530 irq_base, 530 irq_base,
531 handle_edge_irq, 531 handle_simple_irq,
532 IRQ_TYPE_NONE); 532 IRQ_TYPE_NONE);
533 if (ret) { 533 if (ret) {
534 dev_err(&client->dev, 534 dev_err(&client->dev,