[media] soc_camera: fix enum_input
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 15 Jun 2015 11:33:36 +0000 (08:33 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 11 Aug 2015 12:51:17 +0000 (09:51 -0300)
Fill in the std field from the video_device tvnorms field.

This fixes a v4l2-compliance failure.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/soc_camera/soc_camera.c

index d708df4..f24062d 100644 (file)
@@ -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;