This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] gspca-stv06xx: Simplify stv_init struct and vv6410 bridge init
Author:  Erik Andrén <[email protected]>
Date:    Wed Jul 27 17:19:58 2011 -0300

Signed-off-by: Erik Andrén <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c |   13 +-------
 drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h |   35 +++++++++----------
 2 files changed, 18 insertions(+), 30 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=1de40c471f6c557f968a99448580f6dbf8d69d11

diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c 
b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c
index f839843..51b6659 100644
--- a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c
+++ b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c
@@ -138,18 +138,7 @@ static int vv6410_init(struct sd *sd)
        s32 *sensor_settings = sd->sensor_priv;
 
        for (i = 0; i < ARRAY_SIZE(stv_bridge_init); i++) {
-               /* if NULL then len contains single value */
-               if (stv_bridge_init[i].data == NULL) {
-                       err = stv06xx_write_bridge(sd,
-                               stv_bridge_init[i].start,
-                               stv_bridge_init[i].len);
-               } else {
-                       int j;
-                       for (j = 0; j < stv_bridge_init[i].len; j++)
-                               err = stv06xx_write_bridge(sd,
-                                       stv_bridge_init[i].start + j,
-                                       stv_bridge_init[i].data[j]);
-               }
+               stv06xx_write_bridge(sd, stv_bridge_init[i].addr, 
stv_bridge_init[i].data);
        }
 
        if (err < 0)
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h 
b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h
index c7615c2..f75c336 100644
--- a/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h
+++ b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h
@@ -211,28 +211,27 @@ const struct stv06xx_sensor stv06xx_sensor_vv6410 = {
 
 /* If NULL, only single value to write, stored in len */
 struct stv_init {
-       const u8 *data;
-       u16 start;
-       u8 len;
+       u16 addr;
+       u8 data;
 };
 
 static const struct stv_init stv_bridge_init[] = {
        /* This reg is written twice. Some kind of reset? */
-       {NULL, STV_RESET, 0x80},
-       {NULL, STV_RESET, 0x00},
-       {NULL, STV_SCAN_RATE, 0x00},
-       {NULL, STV_I2C_FLUSH, 0x04},
-       {NULL, STV_REG00, 0x0b},
-       {NULL, STV_REG01, 0xa7},
-       {NULL, STV_REG02, 0xb7},
-       {NULL, STV_REG03, 0x00},
-       {NULL, STV_REG04, 0x00},
-       {NULL, 0x1536, 0x02},
-       {NULL, 0x1537, 0x00},
-       {NULL, 0x1538, 0x60},
-       {NULL, 0x1539, 0x01},
-       {NULL, 0x153a, 0x20},
-       {NULL, 0x153b, 0x01},
+       {STV_RESET, 0x80},
+       {STV_RESET, 0x00},
+       {STV_SCAN_RATE, 0x00},
+       {STV_I2C_FLUSH, 0x04},
+       {STV_REG00, 0x0b},
+       {STV_REG01, 0xa7},
+       {STV_REG02, 0xb7},
+       {STV_REG03, 0x00},
+       {STV_REG04, 0x00},
+       {0x1536, 0x02},
+       {0x1537, 0x00},
+       {0x1538, 0x60},
+       {0x1539, 0x01},
+       {0x153a, 0x20},
+       {0x153b, 0x01},
 };
 
 static const u8 vv6410_sensor_init[][2] = {

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to