summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-designware.c
diff options
context:
space:
mode:
authorShinya Kuribayashi2009-11-06 13:50:22 +0100
committerBen Dooks2009-12-09 01:19:12 +0100
commit41c4e35037337cfcd297322f3f60770955156683 (patch)
treeef9c59db8e16ea635131c63aa234d4fe68978335 /drivers/i2c/busses/i2c-designware.c
parenti2c-designware: i2c_dw_func: Set I2C_FUNC_SMBUS_foo bits (diff)
downloadkernel-qcow2-linux-41c4e35037337cfcd297322f3f60770955156683.tar.gz
kernel-qcow2-linux-41c4e35037337cfcd297322f3f60770955156683.tar.xz
kernel-qcow2-linux-41c4e35037337cfcd297322f3f60770955156683.zip
i2c-designware: i2c_dw_read: Remove redundant target address checker
I2c_dw_xfer_msg() also has the same target address inconsistency check, and furthermore it checks across all i2c_msg messages, while i2c_dw_read() walks through i2c_msg messages only with_ I2C_M_RD flag. That is, target address check in i2c_dw_read() is redundant and useless. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-designware.c')
-rw-r--r--drivers/i2c/busses/i2c-designware.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c
index 5ba7e55eb7f4..5a3bd74c81d5 100644
--- a/drivers/i2c/busses/i2c-designware.c
+++ b/drivers/i2c/busses/i2c-designware.c
@@ -419,7 +419,6 @@ static void
i2c_dw_read(struct dw_i2c_dev *dev)
{
struct i2c_msg *msgs = dev->msgs;
- u32 addr = msgs[dev->msg_read_idx].addr;
int rx_valid;
for (; dev->msg_read_idx < dev->msgs_num; dev->msg_read_idx++) {
@@ -429,10 +428,6 @@ i2c_dw_read(struct dw_i2c_dev *dev)
if (!(msgs[dev->msg_read_idx].flags & I2C_M_RD))
continue;
- /* different i2c client, reprogram the i2c adapter */
- if (msgs[dev->msg_read_idx].addr != addr)
- return;
-
if (!(dev->status & STATUS_READ_IN_PROGRESS)) {
len = msgs[dev->msg_read_idx].len;
buf = msgs[dev->msg_read_idx].buf;