diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 01:23:20 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 01:23:20 +0100 |
commit | 88f07ffb63add018bfafd480ec6a294088277f06 (patch) | |
tree | 64b657d06b3ae7de3f87544a85d83d0ed6a7e3a9 /drivers/media/video/bt819.c | |
parent | Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6 (diff) | |
parent | V4L/DVB (3568k): zoran: Use i2c_master_send when possible (diff) | |
download | linux-88f07ffb63add018bfafd480ec6a294088277f06.tar.xz linux-88f07ffb63add018bfafd480ec6a294088277f06.zip |
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
V4L/DVB (3568k): zoran: Use i2c_master_send when possible
V4L/DVB (3568j): adv7175: Drop unused encoder dump command
V4L/DVB (3568i): adv7175: Drop unused register cache
V4L/DVB (3568h): cpia: correct email address
V4L/DVB (3568g): sem2mutex: zoran
V4L/DVB (3568f): saa7110: Fix array overrun
V4L/DVB (3568e): bt856: Spare memory
V4L/DVB (3568d): saa7111.c fix
V4L/DVB (3568c): zoran: Init cleanups
V4L/DVB (3568b): saa7111: Prevent array overrun
V4L/DVB (3568a): saa7114: Fix i2c block write
Diffstat (limited to 'drivers/media/video/bt819.c')
-rw-r--r-- | drivers/media/video/bt819.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c index 2bf63e7ab4e6..d8a18a6a5bee 100644 --- a/drivers/media/video/bt819.c +++ b/drivers/media/video/bt819.c @@ -140,24 +140,21 @@ bt819_write_block (struct i2c_client *client, if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { /* do raw I2C, not smbus compatible */ struct bt819 *decoder = i2c_get_clientdata(client); - struct i2c_msg msg; u8 block_data[32]; + int block_len; - msg.addr = client->addr; - msg.flags = 0; while (len >= 2) { - msg.buf = (char *) block_data; - msg.len = 0; - block_data[msg.len++] = reg = data[0]; + block_len = 0; + block_data[block_len++] = reg = data[0]; do { - block_data[msg.len++] = + block_data[block_len++] = decoder->reg[reg++] = data[1]; len -= 2; data += 2; } while (len >= 2 && data[0] == reg && - msg.len < 32); - if ((ret = i2c_transfer(client->adapter, - &msg, 1)) < 0) + block_len < 32); + if ((ret = i2c_master_send(client, block_data, + block_len)) < 0) break; } } else { |