Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124413
b: refs/heads/master
c: 7831364
h: refs/heads/master
i:
  124411: 369a757
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 94f6810 commit b78aadf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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: 7d4f0b8153608fbfdae26887512fa1fb5229cde9
refs/heads/master: 7831364f33af9bb7333f333e9a239b1dd2edea1c
7 changes: 3 additions & 4 deletions trunk/drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,8 @@ static void res_free(struct em28xx_fh *fh)
{
struct em28xx *dev = fh->dev;

mutex_lock(&dev->lock);
fh->stream_on = 0;
dev->stream_on = 0;
mutex_unlock(&dev->lock);
}

/*
Expand Down Expand Up @@ -1282,7 +1280,9 @@ static int vidioc_streamoff(struct file *file, void *priv,
return -EINVAL;

videobuf_streamoff(&fh->vb_vidq);
mutex_lock(&dev->lock);
res_free(fh);
mutex_unlock(&dev->lock);

return 0;
}
Expand Down Expand Up @@ -1677,11 +1677,10 @@ static int em28xx_v4l2_close(struct inode *inode, struct file *filp)
em28xx_videodbg("users=%d\n", dev->users);


mutex_lock(&dev->lock);
if (res_check(fh))
res_free(fh);

mutex_lock(&dev->lock);

if (dev->users == 1) {
videobuf_stop(&fh->vb_vidq);
videobuf_mmap_free(&fh->vb_vidq);
Expand Down

0 comments on commit b78aadf

Please sign in to comment.