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

[media] ov5642: avoid calling ov5642_find_datafmt() twice

Simplify ov5642_set_fmt().
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Reported-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 20efc1e9
...@@ -811,7 +811,7 @@ static int ov5642_set_fmt(struct v4l2_subdev *sd, ...@@ -811,7 +811,7 @@ static int ov5642_set_fmt(struct v4l2_subdev *sd,
mf->field = V4L2_FIELD_NONE; mf->field = V4L2_FIELD_NONE;
if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE) if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE)
priv->fmt = ov5642_find_datafmt(mf->code); priv->fmt = fmt;
else else
cfg->try_fmt = *mf; cfg->try_fmt = *mf;
return 0; return 0;
......
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