[PATCH 3/8] 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@xxxxxxxxxxxx>
---
drivers/media/video/saa7114.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

--- linux-2.6.16-rc5.orig/drivers/media/video/saa7114.c 2006-03-01 21:09:59.000000000 +0100
+++ linux-2.6.16-rc5/drivers/media/video/saa7114.c 2006-03-01 21:10:10.000000000 +0100
@@ -138,9 +138,6 @@
u8 reg,
u8 value)
{
- /*struct saa7114 *decoder = i2c_get_clientdata(client);*/
-
- /*decoder->reg[reg] = value;*/
return i2c_smbus_write_byte_data(client, reg, value);
}

@@ -156,7 +153,6 @@
* 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];

@@ -167,8 +163,8 @@
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 &&

--
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Error code 000000c2, parameter1 00000007, parameter2 00001153, parameter3 000303
    ... I'm not sure if anyone can point you to a quick fix. ... and find out the driver that is causing this. ... information, contact the vendor for the driver, and get an update. ... > I have been getting the error (Error code 000000c2, ...
    (microsoft.public.windows.server.general)
  • Re: Printing issues: cant change page range, etc
    ... I'm having the same problem on two different iMacs running OS X 10.3.5 ... driver, since it's only Word that is causing the problem. ... any idea how to fix this? ...
    (microsoft.public.mac.office.word)
  • Linux 2.6.9-rc2
    ... ALSA update, and tons of small fixes pretty much ... work on trying to fix up the drivers as we go along, but they can be a bit ... Update unlink testing code in the usbtest driver ...
    (Linux-Kernel)
  • Linux 2.6.5-rc1
    ... Merging from Andrew, but also i2c updates, ALSA CVS merge, netconsole, ... prism54 driver merge, sata updates, carmel driver, pcmcia and nfs client ... fix missing include in include/asm-ia64/sn/router.h ... Fix CONFIG_DEBUG build on x86-64 & small cleanup ...
    (Linux-Kernel)
  • Linux 2.6.11-rc1
    ... small char/generic_serial.c cleanup ... lockd: fix two struct definitions ... serial driver for TI USB 3410/5052 chips ... Split ACPI boot table parsing ...
    (Linux-Kernel)

Loading