diff mbox

:Fix ISR return value in i2c-mpc.c

Message ID BL2PR03MB4496E03E1930685FD2A4FD483600@BL2PR03MB449.namprd03.prod.outlook.com (mailing list archive)
State Not Applicable
Delegated to: Scott Wood
Headers show

Commit Message

Amit Tomar Dec. 12, 2014, 11:17 a.m. UTC
In current scenario, ISR of i2c-mpc.c is returning IRQ_HANDLED for doing nothing which is not right .

With below patch ISR now return IRQ_NONE for doing nothing and IRQ_HANDLED for doing handler work.


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

Comments

Scott Wood Dec. 12, 2014, 9:10 p.m. UTC | #1
On Fri, 2014-12-12 at 11:17 +0000, Amit Tomar wrote:
> In current scenario, ISR of i2c-mpc.c is returning IRQ_HANDLED for doing nothing which is not right .
> 
> With below patch ISR now return IRQ_NONE for doing nothing and IRQ_HANDLED for doing handler work.

Wrap the commit message at around 65-70 characters, change the subject
to "[PATCH] i2c/mpc: Fix ISR return value", and send to the proper
mailing list/maintainers for i2c (see the MAINTAINERS file).

-Scott
Amit Tomar Dec. 13, 2014, 5:02 a.m. UTC | #2
Sorry for sending it to wrong mailing-list :(

Thanks,
Amit.
diff mbox

Patch

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