diff options
author | Mike Isely <isely@pobox.com> | 2007-09-08 21:19:32 -0500 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2007-09-08 21:19:32 -0500 |
commit | 995f38acadb5dae1fb1b2769714d5e45aeb9db5c (patch) | |
tree | e806598d6d0a38cd0d4876e2a85ff75df8340e61 | |
parent | a8dc6cb8c543ac38a021f92e08314ddd047967ee (diff) | |
download | mediapointer-dvb-s2-995f38acadb5dae1fb1b2769714d5e45aeb9db5c.tar.gz mediapointer-dvb-s2-995f38acadb5dae1fb1b2769714d5e45aeb9db5c.tar.bz2 |
pvrusb2: I2C adapter tweaks from Jean Delvare
From: Jean Delvare <khali@linux-fr.org>
* I2C adapters aren't expected to handle I2C_M_NOSTART unless they
really have to. As the pvrusb2 driver doesn't support it, I take it
that it doesn't need it so it shouldn't mention it at all.
* I2C_FUNC_SMBUS_EMUL includes I2C_FUNC_SMBUS_BYTE_DATA so listing
both is redundant.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mike Isely <isely@pobox.com>
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c index 1a9563aa5..018c5d6b7 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c @@ -464,10 +464,6 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, ret = -EINVAL; goto done; } - if ((msgs[0].flags & I2C_M_NOSTART)) { - trace_i2c("i2c refusing I2C_M_NOSTART"); - goto done; - } if (msgs[0].addr < PVR2_I2C_FUNC_CNT) { funcp = hdw->i2c_func[msgs[0].addr]; } @@ -569,14 +565,12 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, cnt = msgs[idx].len; printk(KERN_INFO "pvrusb2 i2c xfer %u/%u:" - " addr=0x%x len=%d %s%s", + " addr=0x%x len=%d %s", idx+1,num, msgs[idx].addr, cnt, (msgs[idx].flags & I2C_M_RD ? - "read" : "write"), - (msgs[idx].flags & I2C_M_NOSTART ? - " nostart" : "")); + "read" : "write")); if ((ret > 0) || !(msgs[idx].flags & I2C_M_RD)) { if (cnt > 8) cnt = 8; printk(" ["); @@ -609,7 +603,7 @@ static int pvr2_i2c_control(struct i2c_adapter *adapter, static u32 pvr2_i2c_functionality(struct i2c_adapter *adap) { - return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C | I2C_FUNC_SMBUS_BYTE_DATA; + return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C; } static int pvr2_i2c_core_singleton(struct i2c_client *cp, |