projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
386b276
)
dm: fsl_i2c: Remove unnecessary variable
author
mario.six@gdsys.cc
<mario.six@gdsys.cc>
Mon, 25 Apr 2016 06:31:04 +0000
(08:31 +0200)
committer
Heiko Schocher
<hs@denx.de>
Tue, 17 May 2016 06:28:53 +0000
(08:28 +0200)
Signed-off-by: Mario Six <mario.six@gdsys.cc>
drivers/i2c/fsl_i2c.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/fsl_i2c.c
b/drivers/i2c/fsl_i2c.c
index 18b8848ced8044683a5c80274298ad245d33a313..4bc1dda005c5a8033d678d31dd625ebe32ea447a 100644
(file)
--- a/
drivers/i2c/fsl_i2c.c
+++ b/
drivers/i2c/fsl_i2c.c
@@
-423,7
+423,6
@@
fsl_i2c_read(struct i2c_adapter *adap, u8 chip_addr, uint offset, int olen,
(struct fsl_i2c_base *)i2c_base[adap->hwadapnr];
int ret = -1; /* signal error */
u8 *o = (u8 *)&offset;
- int len = olen * -1;
if (i2c_wait4bus(adap) < 0)
return -1;
@@
-437,9
+436,9
@@
fsl_i2c_read(struct i2c_adapter *adap, u8 chip_addr, uint offset, int olen,
*/
if (olen < 0) {
if (i2c_write_addr(adap, chip_addr, I2C_WRITE_BIT, 0) != 0)
- ret = __i2c_write(adap, data, len);
+ ret = __i2c_write(adap, data,
-o
len);
- if (ret != len)
+ if (ret !=
-o
len)
return -1;
if (dlen && i2c_write_addr(adap, chip_addr,