forked from luck/tmp_suning_uos_patched
V4L/DVB (11410): gspca - m5602-ov9650: Always init the ov9650 before starting a stream
This is a hack preventing a suspend-to-ram/disk regression. Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
3d3ec926e9
commit
e335f224e3
@ -139,6 +139,7 @@ int ov9650_init(struct sd *sd)
|
|||||||
data = 0x30;
|
data = 0x30;
|
||||||
err = m5602_write_sensor(sd, OV9650_MVFP, &data, 1);
|
err = m5602_write_sensor(sd, OV9650_MVFP, &data, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,6 +148,10 @@ int ov9650_start(struct sd *sd)
|
|||||||
int i, err = 0;
|
int i, err = 0;
|
||||||
struct cam *cam = &sd->gspca_dev.cam;
|
struct cam *cam = &sd->gspca_dev.cam;
|
||||||
|
|
||||||
|
err = ov9650_init(sd);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(res_init_ov9650) && !err; i++) {
|
for (i = 0; i < ARRAY_SIZE(res_init_ov9650) && !err; i++) {
|
||||||
if (res_init_ov9650[i][0] == BRIDGE)
|
if (res_init_ov9650[i][0] == BRIDGE)
|
||||||
err = m5602_write_bridge(sd, res_init_ov9650[i][1], res_init_ov9650[i][2]);
|
err = m5602_write_bridge(sd, res_init_ov9650[i][1], res_init_ov9650[i][2]);
|
||||||
|
Loading…
Reference in New Issue
Block a user