i2c-bfin-twi: remove redundant retry
authorSonic Zhang <sonic.zhang@analog.com>
Mon, 22 Mar 2010 07:23:19 +0000 (03:23 -0400)
committerBen Dooks <ben-linux@fluff.org>
Wed, 19 May 2010 23:18:58 +0000 (00:18 +0100)
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>
drivers/i2c/busses/i2c-bfin-twi.c

index ff61c4b2209525a36f3ee01ed3462f801dead6d8..dabfa80cf5f2236a6d815e48c8b8b16827379153 100644 (file)
@@ -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,
                                struct i2c_msg *msgs, int num)
 {
-       int i, ret = 0;
-
-       for (i = 0; i < adap->retries; i++) {
-               ret = bfin_twi_do_master_xfer(adap, msgs, num);
-               if (ret > 0)
-                       break;
-       }
-
-       return ret;
+       return bfin_twi_do_master_xfer(adap, msgs, num);
 }
 
 /*
@@ -574,16 +566,8 @@ int bfin_twi_smbus_xfer(struct i2c_adapter *adap, u16 addr,
                        unsigned short flags, char read_write,
                        u8 command, int size, union i2c_smbus_data *data)
 {
-       int i, ret = 0;
-
-       for (i = 0; i < adap->retries; i++) {
-               ret = bfin_twi_do_smbus_xfer(adap, addr, flags,
+       return bfin_twi_do_smbus_xfer(adap, addr, flags,
                        read_write, command, size, data);
-               if (ret == 0)
-                       break;
-       }
-
-       return ret;
 }
 
 /*