diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-nomadik.c')
-rw-r--r-- | drivers/i2c/busses/i2c-nomadik.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index 3bf95b90abae..a02141a99713 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c | |||
@@ -615,6 +615,8 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
615 | cause >= ARRAY_SIZE(abort_causes) | 615 | cause >= ARRAY_SIZE(abort_causes) |
616 | ? "unknown reason" : abort_causes[cause]); | 616 | ? "unknown reason" : abort_causes[cause]); |
617 | 617 | ||
618 | status = status ? status : dev->result; | ||
619 | |||
618 | goto out; | 620 | goto out; |
619 | } | 621 | } |
620 | udelay(I2C_DELAY); | 622 | udelay(I2C_DELAY); |
@@ -759,7 +761,7 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg) | |||
759 | | I2C_IT_RXFF | I2C_IT_RXFE)); | 761 | | I2C_IT_RXFF | I2C_IT_RXFE)); |
760 | 762 | ||
761 | if (dev->cli.count) { | 763 | if (dev->cli.count) { |
762 | dev->result = -1; | 764 | dev->result = -EIO; |
763 | dev_err(&dev->pdev->dev, "%lu bytes still remain to be" | 765 | dev_err(&dev->pdev->dev, "%lu bytes still remain to be" |
764 | "xfered\n", dev->cli.count); | 766 | "xfered\n", dev->cli.count); |
765 | (void) init_hw(dev); | 767 | (void) init_hw(dev); |
@@ -770,7 +772,7 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg) | |||
770 | 772 | ||
771 | /* Master Arbitration lost interrupt */ | 773 | /* Master Arbitration lost interrupt */ |
772 | case I2C_IT_MAL: | 774 | case I2C_IT_MAL: |
773 | dev->result = -1; | 775 | dev->result = -EIO; |
774 | (void) init_hw(dev); | 776 | (void) init_hw(dev); |
775 | 777 | ||
776 | i2c_set_bit(dev->virtbase + I2C_ICR, I2C_IT_MAL); | 778 | i2c_set_bit(dev->virtbase + I2C_ICR, I2C_IT_MAL); |
@@ -784,7 +786,7 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg) | |||
784 | * during the transaction. | 786 | * during the transaction. |
785 | */ | 787 | */ |
786 | case I2C_IT_BERR: | 788 | case I2C_IT_BERR: |
787 | dev->result = -1; | 789 | dev->result = -EIO; |
788 | /* get the status */ | 790 | /* get the status */ |
789 | if (((readl(dev->virtbase + I2C_SR) >> 2) & 0x3) == I2C_ABORT) | 791 | if (((readl(dev->virtbase + I2C_SR) >> 2) & 0x3) == I2C_ABORT) |
790 | (void) init_hw(dev); | 792 | (void) init_hw(dev); |
@@ -800,7 +802,7 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg) | |||
800 | * the Tx FIFO is full. | 802 | * the Tx FIFO is full. |
801 | */ | 803 | */ |
802 | case I2C_IT_TXFOVR: | 804 | case I2C_IT_TXFOVR: |
803 | dev->result = -1; | 805 | dev->result = -EIO; |
804 | (void) init_hw(dev); | 806 | (void) init_hw(dev); |
805 | 807 | ||
806 | dev_err(&dev->pdev->dev, "Tx Fifo Over run\n"); | 808 | dev_err(&dev->pdev->dev, "Tx Fifo Over run\n"); |