Loading drivers/i2c/busses/i2c-omap.c +6 −4 Original line number Original line Diff line number Diff line Loading @@ -598,12 +598,8 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap, * REVISIT: We should abort the transfer on signals, but the bus goes * REVISIT: We should abort the transfer on signals, but the bus goes * into arbitration and we're currently unable to recover from it. * into arbitration and we're currently unable to recover from it. */ */ if (dev->set_mpu_wkup_lat != NULL) dev->set_mpu_wkup_lat(dev->dev, dev->latency); r = wait_for_completion_timeout(&dev->cmd_complete, r = wait_for_completion_timeout(&dev->cmd_complete, OMAP_I2C_TIMEOUT); OMAP_I2C_TIMEOUT); if (dev->set_mpu_wkup_lat != NULL) dev->set_mpu_wkup_lat(dev->dev, -1); dev->buf_len = 0; dev->buf_len = 0; if (r < 0) if (r < 0) return r; return r; Loading Loading @@ -654,12 +650,18 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) if (r < 0) if (r < 0) goto out; goto out; if (dev->set_mpu_wkup_lat != NULL) dev->set_mpu_wkup_lat(dev->dev, dev->latency); for (i = 0; i < num; i++) { for (i = 0; i < num; i++) { r = omap_i2c_xfer_msg(adap, &msgs[i], (i == (num - 1))); r = omap_i2c_xfer_msg(adap, &msgs[i], (i == (num - 1))); if (r != 0) if (r != 0) break; break; } } if (dev->set_mpu_wkup_lat != NULL) dev->set_mpu_wkup_lat(dev->dev, -1); if (r == 0) if (r == 0) r = num; r = num; Loading Loading
drivers/i2c/busses/i2c-omap.c +6 −4 Original line number Original line Diff line number Diff line Loading @@ -598,12 +598,8 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap, * REVISIT: We should abort the transfer on signals, but the bus goes * REVISIT: We should abort the transfer on signals, but the bus goes * into arbitration and we're currently unable to recover from it. * into arbitration and we're currently unable to recover from it. */ */ if (dev->set_mpu_wkup_lat != NULL) dev->set_mpu_wkup_lat(dev->dev, dev->latency); r = wait_for_completion_timeout(&dev->cmd_complete, r = wait_for_completion_timeout(&dev->cmd_complete, OMAP_I2C_TIMEOUT); OMAP_I2C_TIMEOUT); if (dev->set_mpu_wkup_lat != NULL) dev->set_mpu_wkup_lat(dev->dev, -1); dev->buf_len = 0; dev->buf_len = 0; if (r < 0) if (r < 0) return r; return r; Loading Loading @@ -654,12 +650,18 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) if (r < 0) if (r < 0) goto out; goto out; if (dev->set_mpu_wkup_lat != NULL) dev->set_mpu_wkup_lat(dev->dev, dev->latency); for (i = 0; i < num; i++) { for (i = 0; i < num; i++) { r = omap_i2c_xfer_msg(adap, &msgs[i], (i == (num - 1))); r = omap_i2c_xfer_msg(adap, &msgs[i], (i == (num - 1))); if (r != 0) if (r != 0) break; break; } } if (dev->set_mpu_wkup_lat != NULL) dev->set_mpu_wkup_lat(dev->dev, -1); if (r == 0) if (r == 0) r = num; r = num; Loading