[media] dw2102: i2c transfer corrected for yet another cards
authorIgor M. Liplianin <liplianin@me.by>
Sun, 27 Feb 2011 19:22:57 +0000 (16:22 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 21 Mar 2011 23:32:40 +0000 (20:32 -0300)
Related to Acorp DS120 and some revisions of DVBWorld DW2102.
If you read three or more registers at one time, you get wrong value for third etc.
Actually, it didn't affect the driver as it reads registers only by one at a time.
But it needs to correct.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/dw2102.c

index ac70e7b79e218c9cd97adc2efee8024906f7c385..2889d32bec253165593c07ae61e67a7d66f95804 100644 (file)
@@ -156,8 +156,7 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
                /* read stv0299 register */
                value = msg[0].buf[0];/* register */
                for (i = 0; i < msg[1].len; i++) {
-                       value = value + i;
-                       ret = dw210x_op_rw(d->udev, 0xb5, value, 0,
+                       ret = dw210x_op_rw(d->udev, 0xb5, value + i, 0,
                                        buf6, 2, DW210X_READ_MSG);
                        msg[1].buf[i] = buf6[0];
                }
This page took 0.026052 seconds and 5 git commands to generate.