From 053fcb6014eef31c2674d344c704118e0ac229ef Mon Sep 17 00:00:00 2001
From: Brandon Philips <brandon@ifup.org>
Date: Tue, 13 Nov 2007 20:11:26 -0300
Subject: 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>
---
 drivers/media/video/cx88/cx88-blackbird.c | 5 +----
 drivers/media/video/cx88/cx88-video.c     | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

(limited to 'drivers/media/video/cx88')

diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index f33f0b47142..f802b565356 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 5ee05f8f3fa..c84dafbdb99 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);
 	}
 
-- 
cgit v1.2.3