diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2007-11-05 12:03:04 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2007-11-05 12:03:04 -0200 |
commit | 46852e874f94c5e33832b5560a4545e53c34fc15 (patch) | |
tree | b3263bd2a7a3147bf76d27608fb36342034630da | |
parent | 8d234dc92ed6e7455c6babc94808686ffe472a2d (diff) | |
download | mediapointer-dvb-s2-46852e874f94c5e33832b5560a4545e53c34fc15.tar.gz mediapointer-dvb-s2-46852e874f94c5e33832b5560a4545e53c34fc15.tar.bz2 |
tm6000: all read messages should use prev_reg
From: Mauro Carvalho Chehab <mchehab@redhat.com>
read messages with length>1 where using the wrong register.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | linux/drivers/staging/tm6000/tm6000-i2c.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/linux/drivers/staging/tm6000/tm6000-i2c.c b/linux/drivers/staging/tm6000/tm6000-i2c.c index aced39fa5..13ac3840f 100644 --- a/linux/drivers/staging/tm6000/tm6000-i2c.c +++ b/linux/drivers/staging/tm6000/tm6000-i2c.c @@ -114,21 +114,11 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap, out of message data. */ /* SMBus Read Byte command */ - if(msgs[i].len == 1) { - // we use the previously used register to read from - rc = tm6000_read_write_usb (dev, - USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, - REQ_16_SET_GET_I2CSEQ, - addr | prev_reg<<8, 0, - msgs[i].buf, msgs[i].len); - } - else { - rc = tm6000_read_write_usb (dev, - USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, - REQ_16_SET_GET_I2CSEQ, - addr|(*msgs[i].buf)<<8, 0, - msgs[i].buf, msgs[i].len); - } + rc = tm6000_read_write_usb (dev, + USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, + REQ_16_SET_GET_I2CSEQ, + addr | (prev_reg << 8), 0, + msgs[i].buf, msgs[i].len); #if 0 if (rc>=0) *msgs[i].buf=rc; |