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/platform/am437x/am437x-vpfe.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers/media/platform/am437x/am437x-vpfe.c') diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c index 9b8a75355c5e..5c17624aaade 100644 --- a/drivers/media/platform/am437x/am437x-vpfe.c +++ b/drivers/media/platform/am437x/am437x-vpfe.c @@ -2081,17 +2081,18 @@ static void vpfe_stop_streaming(struct vb2_queue *vq) spin_unlock_irqrestore(&vpfe->dma_queue_lock, flags); } -static int vpfe_cropcap(struct file *file, void *priv, - struct v4l2_cropcap *crop) +static int vpfe_g_pixelaspect(struct file *file, void *priv, + int type, struct v4l2_fract *f) { struct vpfe_device *vpfe = video_drvdata(file); - vpfe_dbg(2, vpfe, "vpfe_cropcap\n"); + vpfe_dbg(2, vpfe, "vpfe_g_pixelaspect\n"); - if (vpfe->std_index >= ARRAY_SIZE(vpfe_standards)) + if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE || + vpfe->std_index >= ARRAY_SIZE(vpfe_standards)) return -EINVAL; - crop->pixelaspect = vpfe_standards[vpfe->std_index].pixelaspect; + *f = vpfe_standards[vpfe->std_index].pixelaspect; return 0; } @@ -2280,7 +2281,7 @@ static const struct v4l2_ioctl_ops vpfe_ioctl_ops = { .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, .vidioc_unsubscribe_event = v4l2_event_unsubscribe, - .vidioc_cropcap = vpfe_cropcap, + .vidioc_g_pixelaspect = vpfe_g_pixelaspect, .vidioc_g_selection = vpfe_g_selection, .vidioc_s_selection = vpfe_s_selection, -- cgit