]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[media] TT CT-3650 i2c fix
authorJose Alberto Reguero <jareguero@telefonica.net>
Sun, 16 Oct 2011 10:36:57 +0000 (07:36 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 24 Nov 2011 16:25:17 +0000 (14:25 -0200)
This patch fix a bug in the i2c code of ttusb2 driver.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/ttusb2.c

index faed393c08b6acf4cc6117095a912758f1225135..bc50356c5fb6846a909fa826328a709ce81f40a1 100644 (file)
@@ -397,7 +397,7 @@ static int ttusb2_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num
 
                memcpy(&obuf[3], msg[i].buf, msg[i].len);
 
-               if (ttusb2_msg(d, CMD_I2C_XFER, obuf, msg[i].len+3, ibuf, obuf[2] + 3) < 0) {
+               if (ttusb2_msg(d, CMD_I2C_XFER, obuf, obuf[1]+3, ibuf, obuf[2] + 3) < 0) {
                        err("i2c transfer failed.");
                        break;
                }