]> err.no Git - linux-2.6/commitdiff
V4L/DVB (3568i): adv7175: Drop unused register cache
authorJean Delvare <khali@linux-fr.org>
Wed, 22 Mar 2006 06:48:34 +0000 (03:48 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 23 Mar 2006 14:24:25 +0000 (11:24 -0300)
Drop the adv7175 register cache, as it is only written to and never read back
from.  This saves 128 bytes of memory and slightly speeds up the register
writes.

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>
drivers/media/video/adv7175.c

index 4e218f22b214653aaad19696be4303eef2120ae0..245f94265758d8e2d6907f44a3991c7f5d0085b8 100644 (file)
@@ -68,8 +68,6 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
 /* ----------------------------------------------------------------------- */
 
 struct adv7175 {
-       unsigned char reg[128];
-
        int norm;
        int input;
        int enable;
@@ -95,9 +93,6 @@ adv7175_write (struct i2c_client *client,
               u8                 reg,
               u8                 value)
 {
-       struct adv7175 *encoder = i2c_get_clientdata(client);
-
-       encoder->reg[reg] = value;
        return i2c_smbus_write_byte_data(client, reg, value);
 }
 
@@ -120,7 +115,6 @@ 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 adv7175 *encoder = i2c_get_clientdata(client);
                struct i2c_msg msg;
                u8 block_data[32];
 
@@ -131,8 +125,8 @@ adv7175_write_block (struct i2c_client *client,
                        msg.len = 0;
                        block_data[msg.len++] = reg = data[0];
                        do {
-                               block_data[msg.len++] =
-                                   encoder->reg[reg++] = data[1];
+                               block_data[msg.len++] = data[1];
+                               reg++;
                                len -= 2;
                                data += 2;
                        } while (len >= 2 && data[0] == reg &&