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/davinci/vpbe_display.c | 10 +++++----- drivers/media/platform/davinci/vpfe_capture.c | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'drivers/media/platform/davinci') diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 5c235898af7b..9e86b0d36640 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -759,18 +759,18 @@ static int vpbe_display_g_selection(struct file *file, void *priv, return 0; } -static int vpbe_display_cropcap(struct file *file, void *priv, - struct v4l2_cropcap *cropcap) +static int vpbe_display_g_pixelaspect(struct file *file, void *priv, + int type, struct v4l2_fract *f) { struct vpbe_layer *layer = video_drvdata(file); struct vpbe_device *vpbe_dev = layer->disp_dev->vpbe_dev; v4l2_dbg(1, debug, &vpbe_dev->v4l2_dev, "VIDIOC_CROPCAP ioctl\n"); - if (cropcap->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) + if (type != V4L2_BUF_TYPE_VIDEO_OUTPUT) return -EINVAL; - cropcap->pixelaspect = vpbe_dev->current_timings.aspect; + *f = vpbe_dev->current_timings.aspect; return 0; } @@ -1263,7 +1263,7 @@ static const struct v4l2_ioctl_ops vpbe_ioctl_ops = { .vidioc_streamoff = vb2_ioctl_streamoff, .vidioc_expbuf = vb2_ioctl_expbuf, - .vidioc_cropcap = vpbe_display_cropcap, + .vidioc_g_pixelaspect = vpbe_display_g_pixelaspect, .vidioc_g_selection = vpbe_display_g_selection, .vidioc_s_selection = vpbe_display_s_selection, diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index ea3ddd5a42bd..9996bab98fe3 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -1558,20 +1558,20 @@ static int vpfe_streamoff(struct file *file, void *priv, return ret; } -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_dev = video_drvdata(file); - v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_cropcap\n"); + v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_g_pixelaspect\n"); - if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; /* If std_index is invalid, then just return (== 1:1 aspect) */ if (vpfe_dev->std_index >= ARRAY_SIZE(vpfe_standards)) return 0; - crop->pixelaspect = vpfe_standards[vpfe_dev->std_index].pixelaspect; + *f = vpfe_standards[vpfe_dev->std_index].pixelaspect; return 0; } @@ -1677,7 +1677,7 @@ static const struct v4l2_ioctl_ops vpfe_ioctl_ops = { .vidioc_dqbuf = vpfe_dqbuf, .vidioc_streamon = vpfe_streamon, .vidioc_streamoff = vpfe_streamoff, - .vidioc_cropcap = vpfe_cropcap, + .vidioc_g_pixelaspect = vpfe_g_pixelaspect, .vidioc_g_selection = vpfe_g_selection, .vidioc_s_selection = vpfe_s_selection, }; -- cgit v1.2.3