From: Hans Verkuil <hans.verk...@cisco.com>

Various v4l2-compliance fixes: remove unused sliced VBI functions, zero the
reserved fields of struct v4l2_vbi_format and implement the missing 
s_fmt_vbi_cap.

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
---
 drivers/media/usb/cx231xx/cx231xx-video.c |   45 ++---------------------------
 1 file changed, 2 insertions(+), 43 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c 
b/drivers/media/usb/cx231xx/cx231xx-video.c
index ee9c9a5..18789c1 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -1866,47 +1866,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, 
void *priv,
        return 0;
 }
 
-/* Sliced VBI ioctls */
-static int vidioc_g_fmt_sliced_vbi_cap(struct file *file, void *priv,
-                                      struct v4l2_format *f)
-{
-       struct cx231xx_fh *fh = priv;
-       struct cx231xx *dev = fh->dev;
-       int rc;
-
-       rc = check_dev(dev);
-       if (rc < 0)
-               return rc;
-
-       f->fmt.sliced.service_set = 0;
-
-       call_all(dev, vbi, g_sliced_fmt, &f->fmt.sliced);
-
-       if (f->fmt.sliced.service_set == 0)
-               rc = -EINVAL;
-
-       return rc;
-}
-
-static int vidioc_try_set_sliced_vbi_cap(struct file *file, void *priv,
-                                        struct v4l2_format *f)
-{
-       struct cx231xx_fh *fh = priv;
-       struct cx231xx *dev = fh->dev;
-       int rc;
-
-       rc = check_dev(dev);
-       if (rc < 0)
-               return rc;
-
-       call_all(dev, vbi, g_sliced_fmt, &f->fmt.sliced);
-
-       if (f->fmt.sliced.service_set == 0)
-               return -EINVAL;
-
-       return 0;
-}
-
 /* RAW VBI ioctls */
 
 static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
@@ -1926,6 +1885,7 @@ static int vidioc_g_fmt_vbi_cap(struct file *file, void 
*priv,
        f->fmt.vbi.start[1] = (dev->norm & V4L2_STD_625_50) ?
            PAL_VBI_START_LINE + 312 : NTSC_VBI_START_LINE + 263;
        f->fmt.vbi.count[1] = f->fmt.vbi.count[0];
+       memset(f->fmt.vbi.reserved, 0, sizeof(f->fmt.vbi.reserved));
 
        return 0;
 
@@ -1949,6 +1909,7 @@ static int vidioc_try_fmt_vbi_cap(struct file *file, void 
*priv,
        f->fmt.vbi.start[1] = (dev->norm & V4L2_STD_625_50) ?
            PAL_VBI_START_LINE + 312 : NTSC_VBI_START_LINE + 263;
        f->fmt.vbi.count[1] = f->fmt.vbi.count[0];
+       memset(f->fmt.vbi.reserved, 0, sizeof(f->fmt.vbi.reserved));
 
        return 0;
 
@@ -2430,8 +2391,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
        .vidioc_try_fmt_vbi_cap        = vidioc_try_fmt_vbi_cap,
        .vidioc_s_fmt_vbi_cap          = vidioc_s_fmt_vbi_cap,
        .vidioc_cropcap                = vidioc_cropcap,
-       .vidioc_g_fmt_sliced_vbi_cap   = vidioc_g_fmt_sliced_vbi_cap,
-       .vidioc_try_fmt_sliced_vbi_cap = vidioc_try_set_sliced_vbi_cap,
        .vidioc_reqbufs                = vidioc_reqbufs,
        .vidioc_querybuf               = vidioc_querybuf,
        .vidioc_qbuf                   = vidioc_qbuf,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to