From: Hans Verkuil Date: Mon, 4 May 2015 10:25:48 +0000 (-0300) Subject: [media] imx074: avoid calling imx074_find_datafmt() twice X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1d3d64370e0894ee9816d0c3b385a41044921b3f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 --- diff --git a/drivers/media/i2c/soc_camera/imx074.c b/drivers/media/i2c/soc_camera/imx074.c index 9b0f0d03dffd..77f1e0243d6e 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;