Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=080dfbe176c8dd87fc8f27e2941f31171b738f60
Commit:     080dfbe176c8dd87fc8f27e2941f31171b738f60
Parent:     56a3b5ebee0be7af723bfad56def48ebf899b7fb
Author:     Olof Johansson <[EMAIL PROTECTED]>
AuthorDate: Tue Apr 17 00:32:29 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Apr 17 16:36:28 2007 -0700

    Minor bug fixes to i2c-pasemi
    
    * Last write during i2c_xfer is of the wrong byte (off-by-1).
    * Read length is wrong for some of the reads (mistakenly used the PEC
      version)
    
    Signed-off-by: Olof Johansson <[EMAIL PROTECTED]>
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/i2c/busses/i2c-pasemi.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c
index f54fb5d..bf89eee 100644
--- a/drivers/i2c/busses/i2c-pasemi.c
+++ b/drivers/i2c/busses/i2c-pasemi.c
@@ -141,7 +141,7 @@ static int pasemi_i2c_xfer_msg(struct i2c_adapter *adapter,
                for (i = 0; i < msg->len - 1; i++)
                        TXFIFO_WR(smbus, msg->buf[i]);
 
-               TXFIFO_WR(smbus, msg->buf[msg->len] |
+               TXFIFO_WR(smbus, msg->buf[msg->len-1] |
                          (stop ? MTXFIFO_STOP : 0));
        }
 
@@ -226,7 +226,7 @@ static int pasemi_smb_xfer(struct i2c_adapter *adapter,
                        rd = RXFIFO_RD(smbus);
                        len = min_t(u8, (rd & MRXFIFO_DATA_M),
                                    I2C_SMBUS_BLOCK_MAX);
-                       TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ |
+                       TXFIFO_WR(smbus, len | MTXFIFO_READ |
                                         MTXFIFO_STOP);
                } else {
                        len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX);
@@ -258,7 +258,7 @@ static int pasemi_smb_xfer(struct i2c_adapter *adapter,
                rd = RXFIFO_RD(smbus);
                len = min_t(u8, (rd & MRXFIFO_DATA_M),
                            I2C_SMBUS_BLOCK_MAX - len);
-               TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ | MTXFIFO_STOP);
+               TXFIFO_WR(smbus, len | MTXFIFO_READ | MTXFIFO_STOP);
                break;
 
        default:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to