summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7110.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 16:23:20 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 16:23:20 -0800
commit88f07ffb63add018bfafd480ec6a294088277f06 (patch)
tree64b657d06b3ae7de3f87544a85d83d0ed6a7e3a9 /drivers/media/video/saa7110.c
parentb6585dedac232ca79fe978d97a95fdaa6da24f66 (diff)
parent9aa45e34d2948f360f8c0e63d10f49015ca51edd (diff)
downloadtalos-op-linux-88f07ffb63add018bfafd480ec6a294088277f06.tar.gz
talos-op-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/saa7110.c')
-rw-r--r--drivers/media/video/saa7110.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c
index dff06895171b..e18ea268384b 100644
--- a/drivers/media/video/saa7110.c
+++ b/drivers/media/video/saa7110.c
@@ -107,13 +107,8 @@ saa7110_write_block (struct i2c_client *client,
* the adapter understands raw I2C */
if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
struct saa7110 *decoder = i2c_get_clientdata(client);
- struct i2c_msg msg;
- msg.len = len;
- msg.buf = (char *) data;
- msg.addr = client->addr;
- msg.flags = 0;
- ret = i2c_transfer(client->adapter, &msg, 1);
+ ret = i2c_master_send(client, data, len);
/* Cache the written data */
memcpy(decoder->reg + reg, data + 1, len - 1);
@@ -431,15 +426,13 @@ saa7110_command (struct i2c_client *client,
break;
case DECODER_DUMP:
- for (v = 0; v < 0x34; v += 16) {
+ for (v = 0; v < SAA7110_NR_REG; v += 16) {
int j;
- dprintk(1, KERN_INFO "%s: %03x\n", I2C_NAME(client),
+ dprintk(1, KERN_DEBUG "%s: %02x:", I2C_NAME(client),
v);
- for (j = 0; j < 16; j++) {
- dprintk(1, KERN_INFO " %02x",
- decoder->reg[v + j]);
- }
- dprintk(1, KERN_INFO "\n");
+ for (j = 0; j < 16 && v + j < SAA7110_NR_REG; j++)
+ dprintk(1, " %02x", decoder->reg[v + j]);
+ dprintk(1, "\n");
}
break;
OpenPOWER on IntegriCloud