Browse Source

Merge branch 'master' of git://git.denx.de/u-boot-i2c

Tom Rini 8 years ago
parent
commit
2346511961
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/i2c/mv_i2c.c

+ 2 - 2
drivers/i2c/mv_i2c.c

@@ -270,7 +270,7 @@ static int __i2c_read(struct mv_i2c *base, uchar chip, u8 *addr, int alen,
 		msg.condition = I2C_COND_NORMAL;
 		msg.acknack   = I2C_ACKNAK_WAITACK;
 		msg.direction = I2C_WRITE;
-		msg.data      = *(addr++);
+		msg.data      = addr[alen];
 		if (i2c_transfer(base, &msg))
 			return -1;
 	}
@@ -341,7 +341,7 @@ static int __i2c_write(struct mv_i2c *base, uchar chip, u8 *addr, int alen,
 		msg.condition = I2C_COND_NORMAL;
 		msg.acknack   = I2C_ACKNAK_WAITACK;
 		msg.direction = I2C_WRITE;
-		msg.data      = *(addr++);
+		msg.data      = addr[alen];
 		if (i2c_transfer(base, &msg))
 			return -1;
 	}