From: Vasily Khoruzhick Date: Sun, 13 Mar 2011 13:53:29 +0000 (+0200) Subject: i2c-pxa2xx: Don't clear isr bits too early X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=97491ba3f64c2137101efdfe7593305d692d7d63;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git i2c-pxa2xx: Don't clear isr bits too early isr is passed later into i2c_pxa_irq_txempty and i2c_pxa_irq_rxfull and they may use some other bits than irq sources. Signed-off-by: Vasily Khoruzhick Signed-off-by: Ben Dooks --- diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index b914184748c9..f59224a5c761 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -966,8 +966,7 @@ static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id) struct pxa_i2c *i2c = dev_id; u32 isr = readl(_ISR(i2c)); - isr &= VALID_INT_SOURCE; - if (!isr) + if (!(isr & VALID_INT_SOURCE)) return IRQ_NONE; if (i2c_debug > 2 && 0) { @@ -984,7 +983,7 @@ static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id) /* * Always clear all pending IRQs. */ - writel(isr, _ISR(i2c)); + writel(isr & VALID_INT_SOURCE, _ISR(i2c)); if (isr & ISR_SAD) i2c_pxa_slave_start(i2c, isr);