From 5200ab6a32d6055428896a49ec9e3b1652c1a100 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 4 Oct 2018 17:38:15 -0400 Subject: media: vidioc_cropcap -> vidioc_g_pixelaspect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now vidioc_cropcap is only used to return the pixelaspect, so rename it accordingly. Signed-off-by: Hans Verkuil Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'drivers/media/usb/pvrusb2') diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index 97a93ed4bcda..08d5b7aa3537 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c @@ -703,16 +703,19 @@ static int pvr2_try_ext_ctrls(struct file *file, void *priv, return 0; } -static int pvr2_cropcap(struct file *file, void *priv, struct v4l2_cropcap *cap) +static int pvr2_g_pixelaspect(struct file *file, void *priv, + int type, struct v4l2_fract *f) { struct pvr2_v4l2_fh *fh = file->private_data; struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; + struct v4l2_cropcap cap = { .type = type }; int ret; - if (cap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; - ret = pvr2_hdw_get_cropcap(hdw, cap); - cap->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; /* paranoia */ + ret = pvr2_hdw_get_cropcap(hdw, &cap); + if (!ret) + *f = cap.pixelaspect; return ret; } @@ -815,7 +818,7 @@ static const struct v4l2_ioctl_ops pvr2_ioctl_ops = { .vidioc_g_audio = pvr2_g_audio, .vidioc_enumaudio = pvr2_enumaudio, .vidioc_enum_input = pvr2_enum_input, - .vidioc_cropcap = pvr2_cropcap, + .vidioc_g_pixelaspect = pvr2_g_pixelaspect, .vidioc_s_selection = pvr2_s_selection, .vidioc_g_selection = pvr2_g_selection, .vidioc_g_input = pvr2_g_input, -- cgit v1.2.3