[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1269242600-30147-5-git-send-email-vapier@gentoo.org>
Date: Mon, 22 Mar 2010 03:23:19 -0400
From: Mike Frysinger <vapier@...too.org>
To: Andrew Morton <akpm@...ux-foundation.org>,
linux-i2c@...r.kernel.org, Ben Dooks <ben-linux@...ff.org>
Cc: linux-kernel@...r.kernel.org,
uclinux-dist-devel@...ckfin.uclinux.org,
Sonic Zhang <sonic.zhang@...log.com>
Subject: [PATCH 4/5] i2c-bfin-twi: remove redundant retry
From: Sonic Zhang <sonic.zhang@...log.com>
Signed-off-by: Sonic Zhang <sonic.zhang@...log.com>
Signed-off-by: Mike Frysinger <vapier@...too.org>
---
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 3495019..d157105 100644
--- a/drivers/i2c/busses/i2c-bfin-twi.c
+++ b/drivers/i2c/busses/i2c-bfin-twi.c
@@ -357,15 +357,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);
}
/*
@@ -573,16 +565,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;
}
/*
--
1.7.0.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists