Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92637
b: refs/heads/master
c: 0561297
h: refs/heads/master
i:
  92635: 0bb1df7
v: v3
  • Loading branch information
Brandon Philips authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 09386eb commit d7ed0bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 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: 78bb3949a965e8a28e20988e28868429606b3639
refs/heads/master: 0561297501842b5d7e0ca8805084f4d3f97c1078
25 changes: 14 additions & 11 deletions trunk/drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,16 +630,10 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb,
if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size)
return -EINVAL;

if (buf->fmt != fh->fmt ||
buf->vb.width != dev->width ||
buf->vb.height != dev->height ||
buf->vb.field != field) {
buf->fmt = fh->fmt;
buf->vb.width = dev->width;
buf->vb.height = dev->height;
buf->vb.field = field;
buf->vb.state = VIDEOBUF_NEEDS_INIT;
}
buf->fmt = fh->fmt;
buf->vb.width = dev->width;
buf->vb.height = dev->height;
buf->vb.field = field;

if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
rc = videobuf_iolock(vq, &buf->vb, NULL);
Expand Down Expand Up @@ -974,6 +968,12 @@ static int vidioc_s_fmt_cap(struct file *file, void *priv,

mutex_lock(&dev->lock);

if (videobuf_queue_is_busy(&fh->vb_vidq)) {
em28xx_errdev("%s queue busy\n", __func__);
rc = -EBUSY;
goto out;
}

/* set new image size */
dev->width = f->fmt.pix.width;
dev->height = f->fmt.pix.height;
Expand All @@ -985,8 +985,11 @@ static int vidioc_s_fmt_cap(struct file *file, void *priv,
em28xx_set_alternate(dev);
em28xx_resolution_set(dev);

rc = 0;

out:
mutex_unlock(&dev->lock);
return 0;
return rc;
}

static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm)
Expand Down

0 comments on commit d7ed0bf

Please sign in to comment.