Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76437
b: refs/heads/master
c: a644e4a
h: refs/heads/master
i:
  76435: 688cbbc
v: v3
  • Loading branch information
Chris Pascoe authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 0cd2001 commit 7d8d53e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: 272479d7ab067344d118e7633b624bf98f8896f3
refs/heads/master: a644e4a3e95f8ca6eca019c92d8dfde101150687
8 changes: 3 additions & 5 deletions trunk/drivers/media/dvb/dvb-usb/cxusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
return -EAGAIN;

if (num > 2)
warn("more than two i2c messages at a time is not handled yet. TODO.");

for (i = 0; i < num; i++) {

if (d->udev->descriptor.idVendor == USB_VID_MEDION)
Expand All @@ -111,8 +108,9 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
break;
}
memcpy(msg[i].buf, &ibuf[1], msg[i].len);
} else if (i+1 < num && (msg[i+1].flags & I2C_M_RD)) {
/* write then read */
} else if (i+1 < num && (msg[i+1].flags & I2C_M_RD) &&
msg[i].addr == msg[i+1].addr) {
/* write to then read from same address */
u8 obuf[3+msg[i].len], ibuf[1+msg[i+1].len];
obuf[0] = msg[i].len;
obuf[1] = msg[i+1].len;
Expand Down

0 comments on commit 7d8d53e

Please sign in to comment.