mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
pinctrl: sx150x: Return IRQ_NONE if no pending irq
The driver currently reads the interrupt source register, writes the value back to clear it, and always returns IRQ_HANDLED. When the IRQ is shared, the handler should not claim interrupts that are not from this device. Check for zero interrupt source first. It no interrupt is pending, return IRQ_NONE and skip the register write. Signed-off-by: Tsz Shan Chan <tchan@jacques.com.au> Signed-off-by: Linus Walleij <linusw@kernel.org>
This commit is contained in:
parent
cda114315f
commit
c04957d2fc
|
|
@ -550,6 +550,9 @@ static irqreturn_t sx150x_irq_thread_fn(int irq, void *dev_id)
|
|||
if (err < 0)
|
||||
return IRQ_NONE;
|
||||
|
||||
if (!val)
|
||||
return IRQ_NONE;
|
||||
|
||||
err = regmap_write(pctl->regmap, pctl->data->reg_irq_src, val);
|
||||
if (err < 0)
|
||||
return IRQ_NONE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user