]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/media/video/videobuf-vmalloc.c
Merge branch 'master' into csb1725
[mv-sheeva.git] / drivers / media / video / videobuf-vmalloc.c
index e7fe31d54f07258b9fbc333808fc9b34f7a78609..df142580e44cfac0b9451411a43bcd461f572de0 100644 (file)
@@ -75,7 +75,7 @@ static void videobuf_vm_close(struct vm_area_struct *vma)
                struct videobuf_vmalloc_memory *mem;
 
                dprintk(1, "munmap %p q=%p\n", map, q);
-               mutex_lock(&q->vb_lock);
+               videobuf_queue_lock(q);
 
                /* We need first to cancel streams, before unmapping */
                if (q->streaming)
@@ -114,7 +114,7 @@ static void videobuf_vm_close(struct vm_area_struct *vma)
 
                kfree(map);
 
-               mutex_unlock(&q->vb_lock);
+               videobuf_queue_unlock(q);
        }
 
        return;
@@ -304,10 +304,11 @@ void videobuf_queue_vmalloc_init(struct videobuf_queue *q,
                         enum v4l2_buf_type type,
                         enum v4l2_field field,
                         unsigned int msize,
-                        void *priv)
+                        void *priv,
+                        struct mutex *ext_lock)
 {
        videobuf_queue_core_init(q, ops, dev, irqlock, type, field, msize,
-                                priv, &qops);
+                                priv, &qops, ext_lock);
 }
 EXPORT_SYMBOL_GPL(videobuf_queue_vmalloc_init);