Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124471
b: refs/heads/master
c: 13752bd
h: refs/heads/master
i:
  124469: deeeff5
  124467: 4e09f40
  124463: 9074d0e
v: v3
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 552b5f5 commit 235c61e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8a04a6fc4373001a7f311540dba5e4f4d86300f
refs/heads/master: 13752bd9c9db4b9baf847fcb6bb281ba48466dd3
13 changes: 1 addition & 12 deletions trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,6 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
struct gspca_dev *gspca_dev = priv;
int mode;

if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
mode = gspca_dev->curr_mode;
memcpy(&fmt->fmt.pix, &gspca_dev->cam.cam_mode[mode],
sizeof fmt->fmt.pix);
Expand All @@ -788,8 +786,6 @@ static int try_fmt_vid_cap(struct gspca_dev *gspca_dev,
{
int w, h, mode, mode2;

if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
w = fmt->fmt.pix.width;
h = fmt->fmt.pix.height;

Expand Down Expand Up @@ -1143,8 +1139,6 @@ static int vidioc_reqbufs(struct file *file, void *priv,
struct gspca_dev *gspca_dev = priv;
int i, ret = 0;

if (rb->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
switch (rb->memory) {
case GSPCA_MEMORY_READ: /* (internal call) */
case V4L2_MEMORY_MMAP:
Expand Down Expand Up @@ -1209,8 +1203,7 @@ static int vidioc_querybuf(struct file *file, void *priv,
struct gspca_dev *gspca_dev = priv;
struct gspca_frame *frame;

if (v4l2_buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE
|| v4l2_buf->index < 0
if (v4l2_buf->index < 0
|| v4l2_buf->index >= gspca_dev->nframes)
return -EINVAL;

Expand Down Expand Up @@ -1551,8 +1544,6 @@ static int vidioc_dqbuf(struct file *file, void *priv,
int i, ret;

PDEBUG(D_FRAM, "dqbuf");
if (v4l2_buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
if (v4l2_buf->memory != gspca_dev->memory)
return -EINVAL;

Expand Down Expand Up @@ -1607,8 +1598,6 @@ static int vidioc_qbuf(struct file *file, void *priv,
int i, index, ret;

PDEBUG(D_FRAM, "qbuf %d", v4l2_buf->index);
if (v4l2_buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;

if (mutex_lock_interruptible(&gspca_dev->queue_lock))
return -ERESTARTSYS;
Expand Down

0 comments on commit 235c61e

Please sign in to comment.