The patch number 9865 was added via Jean-Francois Moine <moin...@free.fr>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        v4l-dvb-maintai...@linuxtv.org

------

From: Jean-Francois Moine  <moin...@free.fr>
gspca - vc032x: Bad check of the sensor mi0360.


Error was due to bad variable names.

Priority: normal

Signed-off-by: Jean-Francois Moine <moin...@free.fr>


---

 linux/drivers/media/video/gspca/vc032x.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff -r c30a96620f65 -r 8ebf2738581c linux/drivers/media/video/gspca/vc032x.c
--- a/linux/drivers/media/video/gspca/vc032x.c  Fri Dec 05 10:25:26 2008 +0100
+++ b/linux/drivers/media/video/gspca/vc032x.c  Mon Dec 08 08:48:21 2008 +0100
@@ -1456,7 +1456,7 @@ static const struct sensor_info sensor_i
        {SENSOR_OV7670,     0x80 | 0x21, 0x0a, 0x7673, 0x66, 0x67, 0x05},
        {SENSOR_MI1310_SOC, 0x80 | 0x5d, 0x00, 0x143a, 0x24, 0x25, 0x01},
 /* (tested in vc032x_probe_sensor) */
-/*     {SENSOR_MI0360,     0x80 | 0x5d, 0x00, 0x4382, 0x24, 0x25, 0x01}, */
+/*     {SENSOR_MI0360,     0x80 | 0x5d, 0x00, 0x8243, 0x24, 0x25, 0x01}, */
 };
 
 /* read 'len' bytes in gspca_dev->usb_buf */
@@ -1513,18 +1513,18 @@ static void read_sensor_register(struct 
                msleep(1);
        }
        reg_r(gspca_dev, 0xa1, 0xb33e, 1);
-       hdata = gspca_dev->usb_buf[0];
+       ldata = gspca_dev->usb_buf[0];
        reg_r(gspca_dev, 0xa1, 0xb33d, 1);
        mdata = gspca_dev->usb_buf[0];
        reg_r(gspca_dev, 0xa1, 0xb33c, 1);
-       ldata = gspca_dev->usb_buf[0];
-       PDEBUG(D_PROBE, "Read Sensor %02x %02x%02x",
+       hdata = gspca_dev->usb_buf[0];
+       PDEBUG(D_PROBE, "Read Sensor %02x%02x %02x",
                hdata, mdata, ldata);
        reg_r(gspca_dev, 0xa1, 0xb334, 1);
        if (gspca_dev->usb_buf[0] == 0x02)
-               *value = (ldata << 8) + mdata;
+               *value = (hdata << 8) + mdata;
        else
-               *value = ldata;
+               *value = hdata;
 }
 
 static int vc032x_probe_sensor(struct gspca_dev *gspca_dev)
@@ -1551,7 +1551,7 @@ static int vc032x_probe_sensor(struct gs
 
                /* special case for MI0360 */
                if (ptsensor_info->sensorId == SENSOR_MI1310_SOC
-                   && value == 0x4382)
+                   && value == 0x8243)
                        return ptsensor_info->sensorId;
        }
        return -1;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/8ebf2738581c89fcf66ab3ac36fba9256d1500bf

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to