Commit be2f80f0 authored by Sonic Zhang's avatar Sonic Zhang Committed by Ben Dooks

i2c-bfin-twi: remove redundant retry

Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent 5481d075
...@@ -358,15 +358,7 @@ static int bfin_twi_do_master_xfer(struct i2c_adapter *adap, ...@@ -358,15 +358,7 @@ static int bfin_twi_do_master_xfer(struct i2c_adapter *adap,
static int bfin_twi_master_xfer(struct i2c_adapter *adap, static int bfin_twi_master_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num) struct i2c_msg *msgs, int num)
{ {
int i, ret = 0; return bfin_twi_do_master_xfer(adap, msgs, num);
for (i = 0; i < adap->retries; i++) {
ret = bfin_twi_do_master_xfer(adap, msgs, num);
if (ret > 0)
break;
}
return ret;
} }
/* /*
...@@ -574,16 +566,8 @@ int bfin_twi_smbus_xfer(struct i2c_adapter *adap, u16 addr, ...@@ -574,16 +566,8 @@ int bfin_twi_smbus_xfer(struct i2c_adapter *adap, u16 addr,
unsigned short flags, char read_write, unsigned short flags, char read_write,
u8 command, int size, union i2c_smbus_data *data) u8 command, int size, union i2c_smbus_data *data)
{ {
int i, ret = 0; return bfin_twi_do_smbus_xfer(adap, addr, flags,
for (i = 0; i < adap->retries; i++) {
ret = bfin_twi_do_smbus_xfer(adap, addr, flags,
read_write, command, size, data); read_write, command, size, data);
if (ret == 0)
break;
}
return ret;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment