Rather than always reporting that the interrupt was handled, we should
report whether we did handle the interrupt. Arrange to report IRQ_NONE
for cases where we found nothing to do.
This allows us to (eventually) recover from stuck-IRQ problems, rather
than causing the kernel to solidly lock up.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
{
struct tda998x_priv *priv = data;
u8 sta, cec, lvl, flag0, flag1, flag2;
+ bool handled = false;
sta = cec_read(priv, REG_CEC_INTSTATUS);
cec = cec_read(priv, REG_CEC_RXSHPDINT);
if ((flag2 & INT_FLAGS_2_EDID_BLK_RD) && priv->wq_edid_wait) {
priv->wq_edid_wait = 0;
wake_up(&priv->wq_edid);
+ handled = true;
} else if (cec != 0) { /* HPD change */
schedule_delayed_work(&priv->dwork, HZ/10);
+ handled = true;
}
- return IRQ_HANDLED;
+ return IRQ_RETVAL(handled);
}
static uint8_t tda998x_cksum(uint8_t *buf, size_t bytes)