]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: I2C: Do not use interruptible wait call in omap_i2c_xfer_msg
authorJarkko Nikula <jarkko.nikula@nokia.com>
Mon, 9 Oct 2006 12:04:57 +0000 (15:04 +0300)
committerJuha Yrjola <juha.yrjola@solidboot.com>
Mon, 9 Oct 2006 12:41:49 +0000 (15:41 +0300)
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 <jarkko.nikula@nokia.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
drivers/i2c/busses/i2c-omap.c

index 6c58b1bfe1b1480bdab80d1e626bd6ffd67af66c..d3286f79c5a3623caec781d521ed8b413fd869c7 100644 (file)
@@ -331,8 +331,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;