Skip to content

Commit

Permalink
V4L/DVB (10789): m5602-s5k4aa: Split up the initial sensor probe in c…
Browse files Browse the repository at this point in the history
…hunks.

The previous probe rotine tried to read 6 bytes in one chunk which currently isn't allowed. This is the rev. 10346 243399e67c41 readded with a high priority.

Signed-off-by: Gregory Lardiere <spmf2004-m560x@yahoo.fr>
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Gregory Lardiere authored and Mauro Carvalho Chehab committed Mar 5, 2009
1 parent 559595a commit d2c4523
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/media/video/gspca/m5602/m5602_s5k4aa.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ int s5k4aa_probe(struct sd *sd)
}

/* Test some registers, but we don't know their exact meaning yet */
if (m5602_read_sensor(sd, 0x00, prod_id, sizeof(prod_id)))
if (m5602_read_sensor(sd, 0x00, prod_id, 2))
return -ENODEV;
if (m5602_read_sensor(sd, 0x02, prod_id+2, 2))
return -ENODEV;
if (m5602_read_sensor(sd, 0x04, prod_id+4, 2))
return -ENODEV;

if (memcmp(prod_id, expected_prod_id, sizeof(prod_id)))
Expand Down

0 comments on commit d2c4523

Please sign in to comment.