Commit 7d1b8619 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] ov7670: call v4l2_async_register_subdev

Add v4l2-async support for this driver.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent bba58289
...@@ -1636,10 +1636,9 @@ static int ov7670_probe(struct i2c_client *client, ...@@ -1636,10 +1636,9 @@ static int ov7670_probe(struct i2c_client *client,
V4L2_EXPOSURE_AUTO); V4L2_EXPOSURE_AUTO);
sd->ctrl_handler = &info->hdl; sd->ctrl_handler = &info->hdl;
if (info->hdl.error) { if (info->hdl.error) {
int err = info->hdl.error; ret = info->hdl.error;
v4l2_ctrl_handler_free(&info->hdl); goto hdl_free;
return err;
} }
/* /*
* We have checked empirically that hw allows to read back the gain * We have checked empirically that hw allows to read back the gain
...@@ -1651,7 +1650,15 @@ static int ov7670_probe(struct i2c_client *client, ...@@ -1651,7 +1650,15 @@ static int ov7670_probe(struct i2c_client *client,
v4l2_ctrl_cluster(2, &info->saturation); v4l2_ctrl_cluster(2, &info->saturation);
v4l2_ctrl_handler_setup(&info->hdl); v4l2_ctrl_handler_setup(&info->hdl);
ret = v4l2_async_register_subdev(&info->sd);
if (ret < 0)
goto hdl_free;
return 0; return 0;
hdl_free:
v4l2_ctrl_handler_free(&info->hdl);
return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment