diff options
author | Erik Andrén <erik.andren@gmail.com> | 2009-02-22 21:54:11 +0100 |
---|---|---|
committer | Erik Andrén <erik.andren@gmail.com> | 2009-02-22 21:54:11 +0100 |
commit | 3b38addc33a36ea34a73f3f910df0901feb4ff1a (patch) | |
tree | afd158ddea77bc9d8a20805d566b9e7855f8a177 | |
parent | 675a1a53c3d2ca166e3fe921f4f23c2d0f42e5e4 (diff) | |
download | mediapointer-dvb-s2-3b38addc33a36ea34a73f3f910df0901feb4ff1a.tar.gz mediapointer-dvb-s2-3b38addc33a36ea34a73f3f910df0901feb4ff1a.tar.bz2 |
m5602-s5k4aa: Split up the initial sensor probe in chunks.
From: Gregory Lardiere <spmf2004-m560x@yahoo.fr>
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.
Priority: high
Signed-off-by: Gregory Lardiere <spmf2004-m560x@yahoo.fr>
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index 2bd7d4d99..7e79f7eca 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c @@ -104,7 +104,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))) |