]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
V4L/DVB (11474): gspca - m5602-po1030: Fix sensor probing.
authorErik Andr?n <erik.andren@gmail.com>
Sun, 11 Jan 2009 15:52:10 +0000 (12:52 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 16 Jun 2009 21:20:28 +0000 (18:20 -0300)
The po1030 read sensor are currently returning the contents of the address+1 fix the probing of the sensor to cope with this. Obviously this needs to be tracked down and fixed.

Signed-off-by: Erik Andr?n <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/m5602/m5602_po1030.c

index 3ecb53c701ab3b376a1847e6e18782a636aa604b..a45d55c530b5aac3eb171671f7e64587e81d2be7 100644 (file)
@@ -157,7 +157,7 @@ static void po1030_dump_registers(struct sd *sd);
 
 int po1030_probe(struct sd *sd)
 {
-       u8 dev_id_h = 0, dev_id_l = 0, i;
+       u8 dev_id_h = 0, i;
        s32 *sensor_settings;
 
        if (force_sensor) {
@@ -185,10 +185,7 @@ int po1030_probe(struct sd *sd)
        if (m5602_read_sensor(sd, PO1030_DEVID_H, &dev_id_h, 1))
                return -ENODEV;
 
-       if (m5602_read_sensor(sd, PO1030_DEVID_L, &dev_id_l, 1))
-               return -ENODEV;
-
-       if ((dev_id_h == 0x10) && (dev_id_l == 0x30)) {
+       if (dev_id_h == 0x30) {
                info("Detected a po1030 sensor");
                goto sensor_found;
        }