aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-09-08 22:19:32 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:14:35 -0400
commit7fb0dfc853735ccf4e580b0d71510bad96d37c4f (patch)
tree31bfb06427054c515d730d440f232997a36af072
parent56585386e297c54a65feef55810c13b4313bdf1e (diff)
V4L/DVB (6212): pvrusb2: I2C adapter tweaks from Jean Delvare
* 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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-i2c-core.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
index 6786d3c0c98b..7697f391e8bb 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
@@ -389,10 +389,6 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
389 ret = -EINVAL; 389 ret = -EINVAL;
390 goto done; 390 goto done;
391 } 391 }
392 if ((msgs[0].flags & I2C_M_NOSTART)) {
393 trace_i2c("i2c refusing I2C_M_NOSTART");
394 goto done;
395 }
396 if (msgs[0].addr < PVR2_I2C_FUNC_CNT) { 392 if (msgs[0].addr < PVR2_I2C_FUNC_CNT) {
397 funcp = hdw->i2c_func[msgs[0].addr]; 393 funcp = hdw->i2c_func[msgs[0].addr];
398 } 394 }
@@ -494,14 +490,12 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
494 cnt = msgs[idx].len; 490 cnt = msgs[idx].len;
495 printk(KERN_INFO 491 printk(KERN_INFO
496 "pvrusb2 i2c xfer %u/%u:" 492 "pvrusb2 i2c xfer %u/%u:"
497 " addr=0x%x len=%d %s%s", 493 " addr=0x%x len=%d %s",
498 idx+1,num, 494 idx+1,num,
499 msgs[idx].addr, 495 msgs[idx].addr,
500 cnt, 496 cnt,
501 (msgs[idx].flags & I2C_M_RD ? 497 (msgs[idx].flags & I2C_M_RD ?
502 "read" : "write"), 498 "read" : "write"));
503 (msgs[idx].flags & I2C_M_NOSTART ?
504 " nostart" : ""));
505 if ((ret > 0) || !(msgs[idx].flags & I2C_M_RD)) { 499 if ((ret > 0) || !(msgs[idx].flags & I2C_M_RD)) {
506 if (cnt > 8) cnt = 8; 500 if (cnt > 8) cnt = 8;
507 printk(" ["); 501 printk(" [");
@@ -534,7 +528,7 @@ static int pvr2_i2c_control(struct i2c_adapter *adapter,
534 528
535static u32 pvr2_i2c_functionality(struct i2c_adapter *adap) 529static u32 pvr2_i2c_functionality(struct i2c_adapter *adap)
536{ 530{
537 return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C | I2C_FUNC_SMBUS_BYTE_DATA; 531 return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C;
538} 532}
539 533
540static int pvr2_i2c_core_singleton(struct i2c_client *cp, 534static int pvr2_i2c_core_singleton(struct i2c_client *cp,