diff options
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index b33c78586bfc..3e9323effc7c 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -616,12 +616,8 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap, | |||
616 | * REVISIT: We should abort the transfer on signals, but the bus goes | 616 | * REVISIT: We should abort the transfer on signals, but the bus goes |
617 | * into arbitration and we're currently unable to recover from it. | 617 | * into arbitration and we're currently unable to recover from it. |
618 | */ | 618 | */ |
619 | if (dev->set_mpu_wkup_lat != NULL) | ||
620 | dev->set_mpu_wkup_lat(dev->dev, dev->latency); | ||
621 | r = wait_for_completion_timeout(&dev->cmd_complete, | 619 | r = wait_for_completion_timeout(&dev->cmd_complete, |
622 | OMAP_I2C_TIMEOUT); | 620 | OMAP_I2C_TIMEOUT); |
623 | if (dev->set_mpu_wkup_lat != NULL) | ||
624 | dev->set_mpu_wkup_lat(dev->dev, -1); | ||
625 | dev->buf_len = 0; | 621 | dev->buf_len = 0; |
626 | if (r < 0) | 622 | if (r < 0) |
627 | return r; | 623 | return r; |
@@ -672,12 +668,18 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) | |||
672 | if (r < 0) | 668 | if (r < 0) |
673 | goto out; | 669 | goto out; |
674 | 670 | ||
671 | if (dev->set_mpu_wkup_lat != NULL) | ||
672 | dev->set_mpu_wkup_lat(dev->dev, dev->latency); | ||
673 | |||
675 | for (i = 0; i < num; i++) { | 674 | for (i = 0; i < num; i++) { |
676 | r = omap_i2c_xfer_msg(adap, &msgs[i], (i == (num - 1))); | 675 | r = omap_i2c_xfer_msg(adap, &msgs[i], (i == (num - 1))); |
677 | if (r != 0) | 676 | if (r != 0) |
678 | break; | 677 | break; |
679 | } | 678 | } |
680 | 679 | ||
680 | if (dev->set_mpu_wkup_lat != NULL) | ||
681 | dev->set_mpu_wkup_lat(dev->dev, -1); | ||
682 | |||
681 | if (r == 0) | 683 | if (r == 0) |
682 | r = num; | 684 | r = num; |
683 | 685 | ||