[media] tvp7002: Add pad-level DV timings operations
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 25 May 2014 15:42:10 +0000 (12:42 -0300)
The video enum_dv_timings operation is deprecated. Implement the
pad-level version of the operation to prepare for the removal of the
video version.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/i2c/tvp7002.c

index c4e1e2cb3094a909c3d6cc766fea70a2660ea84c..019dbcf505bf406bd45ab8e68aa1e631186347d5 100644 (file)
@@ -833,6 +833,9 @@ static int tvp7002_log_status(struct v4l2_subdev *sd)
 static int tvp7002_enum_dv_timings(struct v4l2_subdev *sd,
                struct v4l2_enum_dv_timings *timings)
 {
+       if (timings->pad != 0)
+               return -EINVAL;
+
        /* Check requested format index is within range */
        if (timings->index >= NUM_TIMINGS)
                return -EINVAL;
@@ -938,6 +941,7 @@ static const struct v4l2_subdev_pad_ops tvp7002_pad_ops = {
        .enum_mbus_code = tvp7002_enum_mbus_code,
        .get_fmt = tvp7002_get_pad_format,
        .set_fmt = tvp7002_set_pad_format,
+       .enum_dv_timings = tvp7002_enum_dv_timings,
 };
 
 /* V4L2 top level operation handlers */