[media] rcar-vin: fix standard in input enumeration
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 24 May 2017 00:15:27 +0000 (21:15 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Jun 2017 14:24:29 +0000 (11:24 -0300)
The driver supports a single input only, which can be either analog or
digital. If the subdevice supports dv_timings_cap the input is digital
and the driver should not fill in the standard.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/rcar-vin/rcar-v4l2.c

index 610f59e2a91426228fd37a5c3e2c1fab6b063b49..7be52c2036bb35fcc1ac1d6ab39dae95bfbfda92 100644 (file)
@@ -483,10 +483,14 @@ static int rvin_enum_input(struct file *file, void *priv,
                return ret;
 
        i->type = V4L2_INPUT_TYPE_CAMERA;
-       i->std = vin->vdev.tvnorms;
 
-       if (v4l2_subdev_has_op(sd, pad, dv_timings_cap))
+       if (v4l2_subdev_has_op(sd, pad, dv_timings_cap)) {
                i->capabilities = V4L2_IN_CAP_DV_TIMINGS;
+               i->std = 0;
+       } else {
+               i->capabilities = V4L2_IN_CAP_STD;
+               i->std = vin->vdev.tvnorms;
+       }
 
        strlcpy(i->name, "Camera", sizeof(i->name));