diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2016-08-16 15:55:58 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-04-10 07:52:31 -0300 |
commit | 7d1b8619eaefc7a1288273964a04cf640f3af33f (patch) | |
tree | 8052825d1a62ff1a181b5b612cb15296a20bbf80 /drivers/media/i2c | |
parent | bba582894a7efd8d7aaa53cf45e5b090c50c3937 (diff) |
[media] ov7670: call v4l2_async_register_subdev
Add v4l2-async support for this driver.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/ov7670.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index 56cfb5ca9c95..9af8d3b8f848 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c @@ -1636,10 +1636,9 @@ static int ov7670_probe(struct i2c_client *client, V4L2_EXPOSURE_AUTO); sd->ctrl_handler = &info->hdl; if (info->hdl.error) { - int err = info->hdl.error; + ret = info->hdl.error; - v4l2_ctrl_handler_free(&info->hdl); - return err; + goto hdl_free; } /* * We have checked empirically that hw allows to read back the gain @@ -1651,7 +1650,15 @@ static int ov7670_probe(struct i2c_client *client, v4l2_ctrl_cluster(2, &info->saturation); v4l2_ctrl_handler_setup(&info->hdl); + ret = v4l2_async_register_subdev(&info->sd); + if (ret < 0) + goto hdl_free; + return 0; + +hdl_free: + v4l2_ctrl_handler_free(&info->hdl); + return ret; } |