summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Philips <brandon@ifup.org>2007-11-13 20:11:26 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-12-11 18:08:09 -0200
commit053fcb6014eef31c2674d344c704118e0ac229ef (patch)
tree8d0ea0b5b7d60081f16756d7c92a8df4c0e0c531
parent19bc5133dae9562e8824ef101464061f9854c1d8 (diff)
downloadop-kernel-dev-053fcb6014eef31c2674d344c704118e0ac229ef.zip
op-kernel-dev-053fcb6014eef31c2674d344c704118e0ac229ef.tar.gz
V4L/DVB (6602): V4L: Convert videobuf drivers to videobuf_stop
Drivers were using cookie cutter code for stopping the read/stream. Use the new videobuf_stop function which is lock safe. Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c5
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c5
-rw-r--r--drivers/media/video/cx88/cx88-video.c5
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c5
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c5
-rw-r--r--drivers/media/video/vivi.c1
6 files changed, 6 insertions, 20 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index a88b56e..2182ef0 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -3827,10 +3827,7 @@ static int bttv_release(struct inode *inode, struct file *file)
/* stop vbi capture */
if (check_btres(fh, RESOURCE_VBI)) {
- if (fh->vbi.streaming)
- videobuf_streamoff(&fh->vbi);
- if (fh->vbi.reading)
- videobuf_read_stop(&fh->vbi);
+ videobuf_stop(&fh->vbi);
free_btres(btv,fh,RESOURCE_VBI);
}
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index f33f0b4..f802b56 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -1085,10 +1085,7 @@ static int mpeg_release(struct inode *inode, struct file *file)
cx8802_cancel_buffers(fh->dev);
/* stop mpeg capture */
- if (fh->mpegq.streaming)
- videobuf_streamoff(&fh->mpegq);
- if (fh->mpegq.reading)
- videobuf_read_stop(&fh->mpegq);
+ videobuf_stop(&fh->mpegq);
videobuf_mmap_free(&fh->mpegq);
file->private_data = NULL;
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index 5ee05f8..c84dafb 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -851,10 +851,7 @@ static int video_release(struct inode *inode, struct file *file)
/* stop vbi capture */
if (res_check(fh, RESOURCE_VBI)) {
- if (fh->vbiq.streaming)
- videobuf_streamoff(&fh->vbiq);
- if (fh->vbiq.reading)
- videobuf_read_stop(&fh->vbiq);
+ videobuf_stop(&fh->vbiq);
res_free(dev,fh,RESOURCE_VBI);
}
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index 75d0c5b..9322f44 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -110,11 +110,8 @@ static int ts_release(struct inode *inode, struct file *file)
{
struct saa7134_dev *dev = file->private_data;
- if (dev->empress_tsq.streaming)
- videobuf_streamoff(&dev->empress_tsq);
mutex_lock(&dev->empress_tsq.lock);
- if (dev->empress_tsq.reading)
- videobuf_read_stop(&dev->empress_tsq);
+ videobuf_stop(&dev->empress_tsq);
videobuf_mmap_free(&dev->empress_tsq);
dev->empress_users--;
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 3b9ffb4..6396d9b 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -1445,10 +1445,7 @@ static int video_release(struct inode *inode, struct file *file)
/* stop vbi capture */
if (res_check(fh, RESOURCE_VBI)) {
- if (fh->vbi.streaming)
- videobuf_streamoff(&fh->vbi);
- if (fh->vbi.reading)
- videobuf_read_stop(&fh->vbi);
+ videobuf_stop(&fh->vbi);
res_free(dev,fh,RESOURCE_VBI);
}
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index ee73dc7..9b54ff9 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -1076,6 +1076,7 @@ static int vivi_release(struct inode *inode, struct file *file)
int minor = iminor(inode);
vivi_stop_thread(vidq);
+ videobuf_stop(&fh->vb_vidq);
videobuf_mmap_free(&fh->vb_vidq);
kfree (fh);
OpenPOWER on IntegriCloud