mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 07:13:34 +00:00
media: i2c: ov5645: Call ov5645_entity_init_cfg() before registering the subdev
Make sure we call ov5645_entity_init_cfg() before registering the subdev to make sure default formats are set up. Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
d781dce66d
commit
87fab0eb25
1 changed files with 2 additions and 2 deletions
|
@ -1220,6 +1220,8 @@ static int ov5645_probe(struct i2c_client *client)
|
||||||
pm_runtime_get_noresume(dev);
|
pm_runtime_get_noresume(dev);
|
||||||
pm_runtime_enable(dev);
|
pm_runtime_enable(dev);
|
||||||
|
|
||||||
|
ov5645_entity_init_cfg(&ov5645->sd, NULL);
|
||||||
|
|
||||||
ret = v4l2_async_register_subdev(&ov5645->sd);
|
ret = v4l2_async_register_subdev(&ov5645->sd);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(dev, "could not register v4l2 device\n");
|
dev_err(dev, "could not register v4l2 device\n");
|
||||||
|
@ -1231,8 +1233,6 @@ static int ov5645_probe(struct i2c_client *client)
|
||||||
pm_runtime_mark_last_busy(dev);
|
pm_runtime_mark_last_busy(dev);
|
||||||
pm_runtime_put_autosuspend(dev);
|
pm_runtime_put_autosuspend(dev);
|
||||||
|
|
||||||
ov5645_entity_init_cfg(&ov5645->sd, NULL);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_pm_runtime:
|
err_pm_runtime:
|
||||||
|
|
Loading…
Reference in a new issue