diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-12-08 02:48:21 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:38:57 -0500 |
commit | e18fd01e63aada731efbcadba6232fde28a20ff5 (patch) | |
tree | c1d55d6a4853e0dacd37e3c792946c755a14b030 /drivers/media/video/gspca/vc032x.c | |
parent | 2961e875ea1b9ef446e7533eff86e6711fd3a727 (diff) |
V4L/DVB (9865): gspca - vc032x: Bad check of the sensor mi0360.
Error was due to bad variable names.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/vc032x.c')
-rw-r--r-- | drivers/media/video/gspca/vc032x.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index 88b5d762dea3..5d5bdbeff504 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c | |||
@@ -1456,7 +1456,7 @@ static const struct sensor_info sensor_info_data[] = { | |||
1456 | {SENSOR_OV7670, 0x80 | 0x21, 0x0a, 0x7673, 0x66, 0x67, 0x05}, | 1456 | {SENSOR_OV7670, 0x80 | 0x21, 0x0a, 0x7673, 0x66, 0x67, 0x05}, |
1457 | {SENSOR_MI1310_SOC, 0x80 | 0x5d, 0x00, 0x143a, 0x24, 0x25, 0x01}, | 1457 | {SENSOR_MI1310_SOC, 0x80 | 0x5d, 0x00, 0x143a, 0x24, 0x25, 0x01}, |
1458 | /* (tested in vc032x_probe_sensor) */ | 1458 | /* (tested in vc032x_probe_sensor) */ |
1459 | /* {SENSOR_MI0360, 0x80 | 0x5d, 0x00, 0x4382, 0x24, 0x25, 0x01}, */ | 1459 | /* {SENSOR_MI0360, 0x80 | 0x5d, 0x00, 0x8243, 0x24, 0x25, 0x01}, */ |
1460 | }; | 1460 | }; |
1461 | 1461 | ||
1462 | /* read 'len' bytes in gspca_dev->usb_buf */ | 1462 | /* read 'len' bytes in gspca_dev->usb_buf */ |
@@ -1513,18 +1513,18 @@ static void read_sensor_register(struct gspca_dev *gspca_dev, | |||
1513 | msleep(1); | 1513 | msleep(1); |
1514 | } | 1514 | } |
1515 | reg_r(gspca_dev, 0xa1, 0xb33e, 1); | 1515 | reg_r(gspca_dev, 0xa1, 0xb33e, 1); |
1516 | hdata = gspca_dev->usb_buf[0]; | 1516 | ldata = gspca_dev->usb_buf[0]; |
1517 | reg_r(gspca_dev, 0xa1, 0xb33d, 1); | 1517 | reg_r(gspca_dev, 0xa1, 0xb33d, 1); |
1518 | mdata = gspca_dev->usb_buf[0]; | 1518 | mdata = gspca_dev->usb_buf[0]; |
1519 | reg_r(gspca_dev, 0xa1, 0xb33c, 1); | 1519 | reg_r(gspca_dev, 0xa1, 0xb33c, 1); |
1520 | ldata = gspca_dev->usb_buf[0]; | 1520 | hdata = gspca_dev->usb_buf[0]; |
1521 | PDEBUG(D_PROBE, "Read Sensor %02x %02x%02x", | 1521 | PDEBUG(D_PROBE, "Read Sensor %02x%02x %02x", |
1522 | hdata, mdata, ldata); | 1522 | hdata, mdata, ldata); |
1523 | reg_r(gspca_dev, 0xa1, 0xb334, 1); | 1523 | reg_r(gspca_dev, 0xa1, 0xb334, 1); |
1524 | if (gspca_dev->usb_buf[0] == 0x02) | 1524 | if (gspca_dev->usb_buf[0] == 0x02) |
1525 | *value = (ldata << 8) + mdata; | 1525 | *value = (hdata << 8) + mdata; |
1526 | else | 1526 | else |
1527 | *value = ldata; | 1527 | *value = hdata; |
1528 | } | 1528 | } |
1529 | 1529 | ||
1530 | static int vc032x_probe_sensor(struct gspca_dev *gspca_dev) | 1530 | static int vc032x_probe_sensor(struct gspca_dev *gspca_dev) |
@@ -1551,7 +1551,7 @@ static int vc032x_probe_sensor(struct gspca_dev *gspca_dev) | |||
1551 | 1551 | ||
1552 | /* special case for MI0360 */ | 1552 | /* special case for MI0360 */ |
1553 | if (ptsensor_info->sensorId == SENSOR_MI1310_SOC | 1553 | if (ptsensor_info->sensorId == SENSOR_MI1310_SOC |
1554 | && value == 0x4382) | 1554 | && value == 0x8243) |
1555 | return ptsensor_info->sensorId; | 1555 | return ptsensor_info->sensorId; |
1556 | } | 1556 | } |
1557 | return -1; | 1557 | return -1; |