Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192672
b: refs/heads/master
c: 28cb88c
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed May 18, 2010
1 parent 9c4c949 commit d66c2a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1ce40b1392e2a20529ad2f01ab76145102c0ef1
refs/heads/master: 28cb88caaec4d22c970a28e080c1815ee3b043fa
20 changes: 5 additions & 15 deletions trunk/drivers/staging/tm6000/tm6000-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,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 (i2c_debug>=2) {
for (byte = 0; byte < msgs[i].len; byte++) {
printk(" %02x", msgs[i].buf[byte]);
Expand Down

0 comments on commit d66c2a5

Please sign in to comment.