diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-01-31 06:51:18 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-25 11:40:26 -0400 |
commit | c916194cafa2787a42fe3609386f4ed6f65b23a8 (patch) | |
tree | 59384b68021c69e2eaed3f9d512cf395346d878d | |
parent | 9646171fac46161b160918f01d3a307376679ed8 (diff) |
[media] adv7842: Add pad-level DV timings operations
The video enum_dv_timings and dv_timings_cap operations are deprecated.
Implement the pad-level version of those operations 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>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/i2c/adv7842.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index 6a4d389c749c..56b8ec95d934 100644 --- a/drivers/media/i2c/adv7842.c +++ b/drivers/media/i2c/adv7842.c | |||
@@ -1399,6 +1399,9 @@ static int read_stdi(struct v4l2_subdev *sd, struct stdi_readback *stdi) | |||
1399 | static int adv7842_enum_dv_timings(struct v4l2_subdev *sd, | 1399 | static int adv7842_enum_dv_timings(struct v4l2_subdev *sd, |
1400 | struct v4l2_enum_dv_timings *timings) | 1400 | struct v4l2_enum_dv_timings *timings) |
1401 | { | 1401 | { |
1402 | if (timings->pad != 0) | ||
1403 | return -EINVAL; | ||
1404 | |||
1402 | return v4l2_enum_dv_timings_cap(timings, | 1405 | return v4l2_enum_dv_timings_cap(timings, |
1403 | adv7842_get_dv_timings_cap(sd), adv7842_check_dv_timings, NULL); | 1406 | adv7842_get_dv_timings_cap(sd), adv7842_check_dv_timings, NULL); |
1404 | } | 1407 | } |
@@ -1406,6 +1409,9 @@ static int adv7842_enum_dv_timings(struct v4l2_subdev *sd, | |||
1406 | static int adv7842_dv_timings_cap(struct v4l2_subdev *sd, | 1409 | static int adv7842_dv_timings_cap(struct v4l2_subdev *sd, |
1407 | struct v4l2_dv_timings_cap *cap) | 1410 | struct v4l2_dv_timings_cap *cap) |
1408 | { | 1411 | { |
1412 | if (cap->pad != 0) | ||
1413 | return -EINVAL; | ||
1414 | |||
1409 | *cap = *adv7842_get_dv_timings_cap(sd); | 1415 | *cap = *adv7842_get_dv_timings_cap(sd); |
1410 | return 0; | 1416 | return 0; |
1411 | } | 1417 | } |
@@ -2901,6 +2907,8 @@ static const struct v4l2_subdev_video_ops adv7842_video_ops = { | |||
2901 | static const struct v4l2_subdev_pad_ops adv7842_pad_ops = { | 2907 | static const struct v4l2_subdev_pad_ops adv7842_pad_ops = { |
2902 | .get_edid = adv7842_get_edid, | 2908 | .get_edid = adv7842_get_edid, |
2903 | .set_edid = adv7842_set_edid, | 2909 | .set_edid = adv7842_set_edid, |
2910 | .enum_dv_timings = adv7842_enum_dv_timings, | ||
2911 | .dv_timings_cap = adv7842_dv_timings_cap, | ||
2904 | }; | 2912 | }; |
2905 | 2913 | ||
2906 | static const struct v4l2_subdev_ops adv7842_ops = { | 2914 | static const struct v4l2_subdev_ops adv7842_ops = { |