Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2970c49270be2a62b1115f73bbfc0b8d3b3f48ba
Commit:     2970c49270be2a62b1115f73bbfc0b8d3b3f48ba
Parent:     dc120b0734fcc6a4c42c73790a02f2fa74a7a326
Author:     Hartmut Birr <[EMAIL PROTECTED]>
AuthorDate: Sun Apr 22 06:57:26 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 15:45:48 2007 -0300

    V4L/DVB (5545): Saa7146: Release capture buffers on device close
    
    If the video device (saa7146 on a FF card) was open for capturing,
    the close call didn't release the capture buffers.
    
    Signed-off-by: Hartmut Birr <[EMAIL PROTECTED]>
    Signed-off-by: Oliver Endriss <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/common/saa7146_video.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/media/common/saa7146_video.c 
b/drivers/media/common/saa7146_video.c
index 7e0cedc..e3d04a4 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -1428,6 +1428,7 @@ static void video_close(struct saa7146_dev *dev, struct 
file *file)
 {
        struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
        struct saa7146_vv *vv = dev->vv_data;
+       struct videobuf_queue *q = &fh->video_q;
        int err;
 
        if (IS_CAPTURE_ACTIVE(fh) != 0) {
@@ -1436,6 +1437,11 @@ static void video_close(struct saa7146_dev *dev, struct 
file *file)
                err = saa7146_stop_preview(fh);
        }
 
+       // release all capture buffers
+       mutex_lock(&q->lock);
+       videobuf_read_stop(q);
+       mutex_unlock(&q->lock);
+
        /* hmm, why is this function declared void? */
        /* return err */
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to