From: Hans Verkuil Date: Mon, 15 Jun 2015 11:33:36 +0000 (-0300) Subject: [media] soc_camera: fix enum_input X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d53c0f72757664d9011263cf655f49959d644028;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] soc_camera: fix enum_input Fill in the std field from the video_device tvnorms field. This fixes a v4l2-compliance failure. Signed-off-by: Hans Verkuil Signed-off-by: Rob Taylor Acked-by: Guennadi Liakhovetski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index d708df410f74..f24062ddd4cd 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c @@ -309,11 +309,14 @@ static int soc_camera_try_fmt_vid_cap(struct file *file, void *priv, static int soc_camera_enum_input(struct file *file, void *priv, struct v4l2_input *inp) { + struct soc_camera_device *icd = file->private_data; + if (inp->index != 0) return -EINVAL; /* default is camera */ inp->type = V4L2_INPUT_TYPE_CAMERA; + inp->std = icd->vdev->tvnorms; strcpy(inp->name, "Camera"); return 0;