提交 d2c45230 编写于 作者: G Gregory Lardiere 提交者: Mauro Carvalho Chehab

V4L/DVB (10789): m5602-s5k4aa: Split up the initial sensor probe in chunks.

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: NGregory Lardiere <spmf2004-m560x@yahoo.fr>
Signed-off-by: NErik Andrén <erik.andren@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 559595a9
......@@ -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)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册