[media] em28xx: make ioctls VIDIOC_G/S_PARM working for VBI devices
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Thu, 7 Feb 2013 16:39:14 +0000 (13:39 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 4 Mar 2013 17:00:28 +0000 (14:00 -0300)
With the current code V4L2_BUF_TYPE_VIDEO_CAPTURE is accepted only, but for VBI
devices only buffer type V4L2_BUF_TYPE_VBI_CAPTURE is used/valid.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/em28xx/em28xx-video.c

index c1f6c59f53aac0b9ea9f9233ca913103a6d45eab..e13b777d2cbf73f3e9e5460d3c658f739bd02726 100644 (file)
@@ -1024,9 +1024,6 @@ static int vidioc_g_parm(struct file *file, void *priv,
        struct em28xx      *dev = fh->dev;
        int rc = 0;
 
-       if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-               return -EINVAL;
-
        p->parm.capture.readbuffers = EM28XX_MIN_BUF;
        if (dev->board.is_webcam)
                rc = v4l2_device_call_until_err(&dev->v4l2_dev, 0,
@@ -1044,9 +1041,6 @@ static int vidioc_s_parm(struct file *file, void *priv,
        struct em28xx_fh   *fh  = priv;
        struct em28xx      *dev = fh->dev;
 
-       if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-               return -EINVAL;
-
        p->parm.capture.readbuffers = EM28XX_MIN_BUF;
        return v4l2_device_call_until_err(&dev->v4l2_dev, 0, video, s_parm, p);
 }