diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-17 22:39:23 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-17 22:39:23 -0300 |
commit | fb2e83ece3c03b94ad9e9ca75d658729b684a789 (patch) | |
tree | 6c1d6b7124e5dd844b02007e66471e7e9238f707 /linux/drivers/media/video/stk-webcam.c | |
parent | 5e90c221e48890f2f2433f153d9584bc4bdd327a (diff) | |
parent | 1596f74981cbcf720947b4fd600028d24edfa783 (diff) | |
download | mediapointer-dvb-s2-fb2e83ece3c03b94ad9e9ca75d658729b684a789.tar.gz mediapointer-dvb-s2-fb2e83ece3c03b94ad9e9ca75d658729b684a789.tar.bz2 |
merge: http://linuxtv.org/hg/~hgoede/libv4l
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/stk-webcam.c')
-rw-r--r-- | linux/drivers/media/video/stk-webcam.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/linux/drivers/media/video/stk-webcam.c b/linux/drivers/media/video/stk-webcam.c index 54efa2cc0..886caf736 100644 --- a/linux/drivers/media/video/stk-webcam.c +++ b/linux/drivers/media/video/stk-webcam.c @@ -1113,8 +1113,6 @@ static int stk_vidioc_reqbufs(struct file *filp, if (dev == NULL) return -ENODEV; - if (rb->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; if (rb->memory != V4L2_MEMORY_MMAP) return -EINVAL; if (is_streaming(dev) @@ -1140,7 +1138,7 @@ static int stk_vidioc_querybuf(struct file *filp, struct stk_camera *dev = priv; struct stk_sio_buffer *sbuf; - if (buf->index < 0 || buf->index >= dev->n_sbufs) + if (buf->index >= dev->n_sbufs) return -EINVAL; sbuf = dev->sio_bufs + buf->index; *buf = sbuf->v4lbuf; @@ -1153,13 +1151,11 @@ static int stk_vidioc_qbuf(struct file *filp, struct stk_camera *dev = priv; struct stk_sio_buffer *sbuf; unsigned long flags; - if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; if (buf->memory != V4L2_MEMORY_MMAP) return -EINVAL; - if (buf->index < 0 || buf->index >= dev->n_sbufs) + if (buf->index >= dev->n_sbufs) return -EINVAL; sbuf = dev->sio_bufs + buf->index; if (sbuf->v4lbuf.flags & V4L2_BUF_FLAG_QUEUED) @@ -1181,8 +1177,7 @@ static int stk_vidioc_dqbuf(struct file *filp, unsigned long flags; int ret; - if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE - || !is_streaming(dev)) + if (!is_streaming(dev)) return -EINVAL; if (filp->f_flags & O_NONBLOCK && list_empty(&dev->sio_full)) @@ -1241,9 +1236,6 @@ static int stk_vidioc_streamoff(struct file *filp, static int stk_vidioc_g_parm(struct file *filp, void *priv, struct v4l2_streamparm *sp) { - if (sp->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; - /*FIXME This is not correct */ sp->parm.capture.timeperframe.numerator = 1; sp->parm.capture.timeperframe.denominator = 30; |