[Patch] :Fix ISR return value in i2c-mpc.c

Amit Tomar Amit.Tomar at freescale.com
Fri Dec 12 19:08:17 AEDT 2014


ISR should return IRQ_HANDLED only in case of handling something.


Signed-off-by: Amit Singh Tomar <amit.tomar at freescale.com>
---
drivers/i2c/busses/i2c-mpc.c |    3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 0edf630..7a3136f 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -95,8 +95,9 @@ static irqreturn_t mpc_i2c_isr(int irq, void *dev_id)
        i2c->interrupt = readb(i2c->base + MPC_I2C_SR);
        writeb(0, i2c->base + MPC_I2C_SR);
        wake_up(&i2c->queue);
+     return IRQ_HANDLED;
    }
-   return IRQ_HANDLED;
+  return IRQ_NONE;
}

/* Sometimes 9th clock pulse isn't generated, and slave doesn't release
--
1.7.9.5

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20141212/4ed9ac21/attachment-0001.html>


More information about the Linuxppc-dev mailing list