diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-03-22 03:48:35 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-23 11:24:30 -0300 |
commit | 9aa45e34d2948f360f8c0e63d10f49015ca51edd (patch) | |
tree | 52b5715c005a81989e0d3660bcffa0a6a9ed0e34 /drivers/media/video/adv7175.c | |
parent | 5a313c59bcc5062fc56088d5ff9289828c4b6626 (diff) | |
download | linux-stable-9aa45e34d2948f360f8c0e63d10f49015ca51edd.tar.gz linux-stable-9aa45e34d2948f360f8c0e63d10f49015ca51edd.tar.bz2 linux-stable-9aa45e34d2948f360f8c0e63d10f49015ca51edd.zip |
V4L/DVB (3568k): zoran: Use i2c_master_send when possible
Change all the Zoran (ZR36050/ZR36060) drivers to use i2c_master_send instead
of i2c_transfer when possible. This simplifies the code by a few lines in
each driver.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/adv7175.c')
-rw-r--r-- | drivers/media/video/adv7175.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c index ca86de0c2805..1a2b111897d5 100644 --- a/drivers/media/video/adv7175.c +++ b/drivers/media/video/adv7175.c @@ -115,24 +115,21 @@ adv7175_write_block (struct i2c_client *client, * the adapter understands raw I2C */ if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { /* do raw I2C, not smbus compatible */ - 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++] = data[1]; + block_data[block_len++] = data[1]; reg++; 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 { |