[media] imx074: avoid calling imx074_find_datafmt() twice

Simplify imx074_set_fmt().

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Hans Verkuil 2015-05-04 07:25:48 -03:00 committed by Mauro Carvalho Chehab
parent 3a2824c72a
commit 1d3d64370e

View File

@ -180,7 +180,7 @@ static int imx074_set_fmt(struct v4l2_subdev *sd,
mf->field = V4L2_FIELD_NONE;
if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE)
priv->fmt = imx074_find_datafmt(mf->code);
priv->fmt = fmt;
else
cfg->try_fmt = *mf;