diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2018-10-04 17:38:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-11-20 13:57:21 -0500 |
commit | 5200ab6a32d6055428896a49ec9e3b1652c1a100 (patch) | |
tree | a8f3b7f3b74ced922396877e58f4d1d24e43bd24 /drivers/media/pci/cobalt | |
parent | ed3e2749ff4a94e35de653f9bbce407eb25ae363 (diff) | |
download | lwn-5200ab6a32d6055428896a49ec9e3b1652c1a100.tar.gz lwn-5200ab6a32d6055428896a49ec9e3b1652c1a100.zip |
media: vidioc_cropcap -> vidioc_g_pixelaspect
Now vidioc_cropcap is only used to return the pixelaspect, so
rename it accordingly.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/pci/cobalt')
-rw-r--r-- | drivers/media/pci/cobalt/cobalt-v4l2.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c index 4a0205aae4b4..c088de551081 100644 --- a/drivers/media/pci/cobalt/cobalt-v4l2.c +++ b/drivers/media/pci/cobalt/cobalt-v4l2.c @@ -1077,20 +1077,22 @@ static int cobalt_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a) return 0; } -static int cobalt_cropcap(struct file *file, void *fh, struct v4l2_cropcap *cc) +static int cobalt_g_pixelaspect(struct file *file, void *fh, + int type, struct v4l2_fract *f) { struct cobalt_stream *s = video_drvdata(file); struct v4l2_dv_timings timings; int err = 0; - if (cc->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; + if (s->input == 1) timings = cea1080p60; else err = v4l2_subdev_call(s->sd, video, g_dv_timings, &timings); if (!err) - cc->pixelaspect = v4l2_dv_timings_aspect_ratio(&timings); + *f = v4l2_dv_timings_aspect_ratio(&timings); return err; } @@ -1132,7 +1134,7 @@ static const struct v4l2_ioctl_ops cobalt_ioctl_ops = { .vidioc_log_status = cobalt_log_status, .vidioc_streamon = vb2_ioctl_streamon, .vidioc_streamoff = vb2_ioctl_streamoff, - .vidioc_cropcap = cobalt_cropcap, + .vidioc_g_pixelaspect = cobalt_g_pixelaspect, .vidioc_g_selection = cobalt_g_selection, .vidioc_enum_input = cobalt_enum_input, .vidioc_g_input = cobalt_g_input, |