mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-17 22:41:25 +00:00
V4L/DVB (11637): gspca - m5602-ov7660: Design init function.
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
ea8f74b168
commit
0364c4ca34
@ -85,11 +85,6 @@ int ov7660_probe(struct sd *sd)
|
||||
return -ENODEV;
|
||||
|
||||
sensor_found:
|
||||
sensor_settings = kmalloc(
|
||||
ARRAY_SIZE(ov7660_ctrls) * sizeof(s32), GFP_KERNEL);
|
||||
if (!sensor_settings)
|
||||
return -ENOMEM;
|
||||
|
||||
sd->gspca_dev.cam.cam_mode = ov7660_modes;
|
||||
sd->gspca_dev.cam.nmodes = ARRAY_SIZE(ov7660_modes);
|
||||
sd->desc->ctrls = ov7660_ctrls;
|
||||
@ -104,7 +99,27 @@ sensor_found:
|
||||
|
||||
int ov7660_init(struct sd *sd)
|
||||
{
|
||||
return 0;
|
||||
int i, err = 0;
|
||||
|
||||
/* Init the sensor */
|
||||
for (i = 0; i < ARRAY_SIZE(init_ov7660); i++) {
|
||||
u8 data[2];
|
||||
|
||||
if (init_ov7660[i][0] == BRIDGE) {
|
||||
err = m5602_write_bridge(sd,
|
||||
init_ov7660[i][1],
|
||||
init_ov7660[i][2]);
|
||||
} else {
|
||||
data[0] = init_ov7660[i][2];
|
||||
err = m5602_write_sensor(sd,
|
||||
init_ov7660[i][1], data, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (dump_sensor)
|
||||
ov7660_dump_registers(sd);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int ov7660_start(struct sd *sd)
|
||||
|
Loading…
Reference in New Issue
Block a user