From 1d3d64370e0894ee9816d0c3b385a41044921b3f Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 4 May 2015 07:25:48 -0300 Subject: [PATCH] [media] imx074: avoid calling imx074_find_datafmt() twice Simplify imx074_set_fmt(). Signed-off-by: Hans Verkuil Reported-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/soc_camera/imx074.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/soc_camera/imx074.c b/drivers/media/i2c/soc_camera/imx074.c index 9b0f0d0..77f1e02 100644 --- a/drivers/media/i2c/soc_camera/imx074.c +++ b/drivers/media/i2c/soc_camera/imx074.c @@ -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; -- 2.7.4