aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7110.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 19:23:20 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 19:23:20 -0500
commit88f07ffb63add018bfafd480ec6a294088277f06 (patch)
tree64b657d06b3ae7de3f87544a85d83d0ed6a7e3a9 /drivers/media/video/saa7110.c
parentb6585dedac232ca79fe978d97a95fdaa6da24f66 (diff)
parent9aa45e34d2948f360f8c0e63d10f49015ca51edd (diff)
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,
107 * the adapter understands raw I2C */ 107 * the adapter understands raw I2C */
108 if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { 108 if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
109 struct saa7110 *decoder = i2c_get_clientdata(client); 109 struct saa7110 *decoder = i2c_get_clientdata(client);
110 struct i2c_msg msg;
111 110
112 msg.len = len; 111 ret = i2c_master_send(client, data, len);
113 msg.buf = (char *) data;
114 msg.addr = client->addr;
115 msg.flags = 0;
116 ret = i2c_transfer(client->adapter, &msg, 1);
117 112
118 /* Cache the written data */ 113 /* Cache the written data */
119 memcpy(decoder->reg + reg, data + 1, len - 1); 114 memcpy(decoder->reg + reg, data + 1, len - 1);
@@ -431,15 +426,13 @@ saa7110_command (struct i2c_client *client,
431 break; 426 break;
432 427
433 case DECODER_DUMP: 428 case DECODER_DUMP:
434 for (v = 0; v < 0x34; v += 16) { 429 for (v = 0; v < SAA7110_NR_REG; v += 16) {
435 int j; 430 int j;
436 dprintk(1, KERN_INFO "%s: %03x\n", I2C_NAME(client), 431 dprintk(1, KERN_DEBUG "%s: %02x:", I2C_NAME(client),
437 v); 432 v);
438 for (j = 0; j < 16; j++) { 433 for (j = 0; j < 16 && v + j < SAA7110_NR_REG; j++)
439 dprintk(1, KERN_INFO " %02x", 434 dprintk(1, " %02x", decoder->reg[v + j]);
440 decoder->reg[v + j]); 435 dprintk(1, "\n");
441 }
442 dprintk(1, KERN_INFO "\n");
443 } 436 }
444 break; 437 break;
445 438