diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2018-10-04 23:38:15 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-11-20 19:57:21 +0100 |
commit | 5200ab6a32d6055428896a49ec9e3b1652c1a100 (patch) | |
tree | a8f3b7f3b74ced922396877e58f4d1d24e43bd24 /drivers/media/pci/ivtv | |
parent | media: v4l2-ioctl: remove unused vidioc_g/s_crop (diff) | |
download | linux-5200ab6a32d6055428896a49ec9e3b1652c1a100.tar.xz linux-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/ivtv')
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-ioctl.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index a66f8b872520..6c269ecd8d05 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c @@ -829,17 +829,18 @@ static int ivtv_enum_output(struct file *file, void *fh, struct v4l2_output *vou return ivtv_get_output(itv, vout->index, vout); } -static int ivtv_cropcap(struct file *file, void *fh, struct v4l2_cropcap *cropcap) +static int ivtv_g_pixelaspect(struct file *file, void *fh, + int type, struct v4l2_fract *f) { struct ivtv_open_id *id = fh2id(fh); struct ivtv *itv = id->itv; - if (cropcap->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { - cropcap->pixelaspect.numerator = itv->is_50hz ? 54 : 11; - cropcap->pixelaspect.denominator = itv->is_50hz ? 59 : 10; - } else if (cropcap->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) { - cropcap->pixelaspect.numerator = itv->is_out_50hz ? 54 : 11; - cropcap->pixelaspect.denominator = itv->is_out_50hz ? 59 : 10; + if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { + f->numerator = itv->is_50hz ? 54 : 11; + f->denominator = itv->is_50hz ? 59 : 10; + } else if (type == V4L2_BUF_TYPE_VIDEO_OUTPUT) { + f->numerator = itv->is_out_50hz ? 54 : 11; + f->denominator = itv->is_out_50hz ? 59 : 10; } else { return -EINVAL; } @@ -1923,7 +1924,7 @@ static const struct v4l2_ioctl_ops ivtv_ioctl_ops = { .vidioc_enum_input = ivtv_enum_input, .vidioc_enum_output = ivtv_enum_output, .vidioc_enumaudout = ivtv_enumaudout, - .vidioc_cropcap = ivtv_cropcap, + .vidioc_g_pixelaspect = ivtv_g_pixelaspect, .vidioc_s_selection = ivtv_s_selection, .vidioc_g_selection = ivtv_g_selection, .vidioc_g_input = ivtv_g_input, |