From: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
To: Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Cc: uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 4/5] i2c-bfin-twi: remove redundant retry
Date: Mon, 22 Mar 2010 03:23:19 -0400 [thread overview]
Message-ID: <1269242600-30147-5-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1269242600-30147-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
From: Sonic Zhang <sonic.zhang-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Sonic Zhang <sonic.zhang-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.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
next prev parent reply other threads:[~2010-03-22 7:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 7:23 [PATCH 0/5] Blackfin I2C updates Mike Frysinger
2010-03-22 7:23 ` [PATCH 1/5] i2c-bfin-twi: integrate timeout timer with completion interface Mike Frysinger
2010-03-22 7:23 ` [PATCH 2/5] i2c-bfin-twi: add debug output for error status Mike Frysinger
[not found] ` <1269242600-30147-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2010-03-22 7:23 ` [PATCH 3/5] i2c-bfin-twi: fix lost interrupts at high speeds Mike Frysinger
2010-03-22 7:23 ` Mike Frysinger [this message]
2010-04-28 22:09 ` [Uclinux-dist-devel] [PATCH 0/5] Blackfin I2C updates Mike Frysinger
2010-03-22 7:23 ` [PATCH 5/5] i2c-bfin-twi: return completion in interrupt for smbus quick transfers Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1269242600-30147-5-git-send-email-vapier@gentoo.org \
--to=vapier-abrp7r+bbdudnm+yrofe0a@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).