[media] anysee: fix multibyte I2C read
authorAntti Palosaari <crope@iki.fi>
Sun, 10 Apr 2011 00:00:51 +0000 (21:00 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 20 May 2011 12:27:00 +0000 (09:27 -0300)
It can read more than one byte from I2C bus. Allow that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/anysee.c
drivers/media/dvb/dvb-usb/anysee.h

index 18184d30e48113b6954f3cdb0dbf1d7725fc2fe9..554186205eec7f0cb2a68ae012000ed15666517b 100644 (file)
@@ -166,7 +166,7 @@ static int anysee_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,
                        buf[2] = msg[i].buf[0];
                        buf[3] = 0x00;
                        buf[4] = 0x00;
-                       buf[5] = 0x01;
+                       buf[5] = msg[i+1].len;
                        ret = anysee_ctrl_msg(d, buf, sizeof(buf), msg[i+1].buf,
                                msg[i+1].len);
                        inc = 2;
index 7ca01ff6e13ccadd3944d0199f22758fe946dd95..686e06044fcbd01b51b6e8d1f105a8b3dec46a0a 100644 (file)
@@ -136,7 +136,7 @@ General reply packet(s) are always used if not own reply defined.
 ----------------------------------------------------------------------------
 |    04 | 0x00
 ----------------------------------------------------------------------------
-|    05 | 0x01
+|    05 | data length
 ----------------------------------------------------------------------------
 | 06-59 | don't care
 ----------------------------------------------------------------------------