diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-03-22 03:48:33 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-23 11:24:03 -0300 |
commit | 6254312352dfd1c996245cb3bc74be901dc165cc (patch) | |
tree | 4040c6d047f4be61b0a55b0b34323d3ef34e3884 /drivers/media/video/saa7114.c | |
parent | 2e6e33bab6e1996a5dec9108fb467b52b841e7a8 (diff) |
V4L/DVB (3568a): saa7114: Fix i2c block write
Fix the i2c block write mode of the saa7114 driver. A previous code change
accidentally commented out a local variable increment, which should have been
kept, causing the register writes over the I2C bus to never be batched,
replacing any attempted block write by slower, individual write transactions.
Also drop the commented out code, as it only adds to confusion.
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/saa7114.c')
-rw-r--r-- | drivers/media/video/saa7114.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/saa7114.c b/drivers/media/video/saa7114.c index fd0a4b4ef014..1c29d05307a5 100644 --- a/drivers/media/video/saa7114.c +++ b/drivers/media/video/saa7114.c @@ -139,9 +139,6 @@ saa7114_write (struct i2c_client *client, u8 reg, u8 value) { - /*struct saa7114 *decoder = i2c_get_clientdata(client);*/ - - /*decoder->reg[reg] = value;*/ return i2c_smbus_write_byte_data(client, reg, value); } @@ -157,7 +154,6 @@ saa7114_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 saa7114 *decoder = i2c_get_clientdata(client);*/ struct i2c_msg msg; u8 block_data[32]; @@ -168,8 +164,8 @@ saa7114_write_block (struct i2c_client *client, msg.len = 0; block_data[msg.len++] = reg = data[0]; do { - block_data[msg.len++] = - /*decoder->reg[reg++] =*/ data[1]; + block_data[msg.len++] = data[1]; + reg++; len -= 2; data += 2; } while (len >= 2 && data[0] == reg && |