diff options
author | Igor M. Liplianin <liplianin@me.by> | 2011-02-27 14:22:57 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-21 19:32:40 -0400 |
commit | b16af29a561c92ed76b5b882dd68bb082b07a09b (patch) | |
tree | abbc2f5de09ed971307206661fc011df20e212fe | |
parent | a84adf4007d80249cbe04da4ee80689a8cfdffda (diff) |
[media] dw2102: i2c transfer corrected for yet another cards
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>
-rw-r--r-- | drivers/media/dvb/dvb-usb/dw2102.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c index ac70e7b79e21..2889d32bec25 100644 --- a/drivers/media/dvb/dvb-usb/dw2102.c +++ b/drivers/media/dvb/dvb-usb/dw2102.c | |||
@@ -156,8 +156,7 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], | |||
156 | /* read stv0299 register */ | 156 | /* read stv0299 register */ |
157 | value = msg[0].buf[0];/* register */ | 157 | value = msg[0].buf[0];/* register */ |
158 | for (i = 0; i < msg[1].len; i++) { | 158 | for (i = 0; i < msg[1].len; i++) { |
159 | value = value + i; | 159 | ret = dw210x_op_rw(d->udev, 0xb5, value + i, 0, |
160 | ret = dw210x_op_rw(d->udev, 0xb5, value, 0, | ||
161 | buf6, 2, DW210X_READ_MSG); | 160 | buf6, 2, DW210X_READ_MSG); |
162 | msg[1].buf[i] = buf6[0]; | 161 | msg[1].buf[i] = buf6[0]; |
163 | } | 162 | } |