From: Jarkko Nikula Date: Mon, 23 Oct 2006 18:18:43 +0000 (+0300) Subject: ARM: OMAP: I2C: Do not use interruptible wait call in omap_i2c_xfer_msg X-Git-Tag: v2.6.19-omap1~125 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f6a1a3e5d8928fb8093855c8da1a3dfd7805e229;p=linux-2.6-omap-h63xx.git ARM: OMAP: I2C: Do not use interruptible wait call in omap_i2c_xfer_msg If there is a signal pending and wait_for_completion_interruptible_timeout terminates with -ERESTARTSYS, we return and disable the i2c clocks in omap_i2c_xfer. If we terminate before sending last i2c message with a stop condition, the bus remains busy and we are not able to send new messages into bus with successive omap_i2c_xfer calls. Therefore a pending signal is not caught here and we return only because of timeout or i2c error. Signed-off-by: Jarkko Nikula Signed-off-by: Juha Yrjola --- diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index dec04da0455..fa5a4f25e82 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -314,8 +314,8 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap, w |= OMAP_I2C_CON_STP; omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, w); - r = wait_for_completion_interruptible_timeout(&dev->cmd_complete, - OMAP_I2C_TIMEOUT); + r = wait_for_completion_timeout(&dev->cmd_complete, + OMAP_I2C_TIMEOUT); dev->buf_len = 0; if (r < 0) return r;