diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2010-03-22 03:23:19 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-19 19:18:58 -0400 |
commit | be2f80f0a3a333c0c00b2c8a7c2d74fcd66b75a2 (patch) | |
tree | 22d88c7054590be32be77ca246f8aa8eef529f5f /drivers/i2c | |
parent | 5481d0753e7a78bff7550a8165b7924baa74e9cf (diff) |
i2c-bfin-twi: remove redundant retry
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-bfin-twi.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index ff61c4b22095..dabfa80cf5f2 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c | |||
@@ -358,15 +358,7 @@ static int bfin_twi_do_master_xfer(struct i2c_adapter *adap, | |||
358 | static int bfin_twi_master_xfer(struct i2c_adapter *adap, | 358 | static int bfin_twi_master_xfer(struct i2c_adapter *adap, |
359 | struct i2c_msg *msgs, int num) | 359 | struct i2c_msg *msgs, int num) |
360 | { | 360 | { |
361 | int i, ret = 0; | 361 | return bfin_twi_do_master_xfer(adap, msgs, num); |
362 | |||
363 | for (i = 0; i < adap->retries; i++) { | ||
364 | ret = bfin_twi_do_master_xfer(adap, msgs, num); | ||
365 | if (ret > 0) | ||
366 | break; | ||
367 | } | ||
368 | |||
369 | return ret; | ||
370 | } | 362 | } |
371 | 363 | ||
372 | /* | 364 | /* |
@@ -574,16 +566,8 @@ int bfin_twi_smbus_xfer(struct i2c_adapter *adap, u16 addr, | |||
574 | unsigned short flags, char read_write, | 566 | unsigned short flags, char read_write, |
575 | u8 command, int size, union i2c_smbus_data *data) | 567 | u8 command, int size, union i2c_smbus_data *data) |
576 | { | 568 | { |
577 | int i, ret = 0; | 569 | return bfin_twi_do_smbus_xfer(adap, addr, flags, |
578 | |||
579 | for (i = 0; i < adap->retries; i++) { | ||
580 | ret = bfin_twi_do_smbus_xfer(adap, addr, flags, | ||
581 | read_write, command, size, data); | 570 | read_write, command, size, data); |
582 | if (ret == 0) | ||
583 | break; | ||
584 | } | ||
585 | |||
586 | return ret; | ||
587 | } | 571 | } |
588 | 572 | ||
589 | /* | 573 | /* |