diff options
Diffstat (limited to 'drivers/media/video/video-buf.c')
-rw-r--r-- | drivers/media/video/video-buf.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c index 574b8e36f3c6..acfd3a103f35 100644 --- a/drivers/media/video/video-buf.c +++ b/drivers/media/video/video-buf.c | |||
@@ -147,7 +147,7 @@ int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction, | |||
147 | data,size,dma->nr_pages); | 147 | data,size,dma->nr_pages); |
148 | 148 | ||
149 | down_read(¤t->mm->mmap_sem); | 149 | down_read(¤t->mm->mmap_sem); |
150 | err = get_user_pages(current,current->mm, | 150 | err = get_user_pages(current,current->mm, |
151 | data & PAGE_MASK, dma->nr_pages, | 151 | data & PAGE_MASK, dma->nr_pages, |
152 | rw == READ, 1, /* force */ | 152 | rw == READ, 1, /* force */ |
153 | dma->pages, NULL); | 153 | dma->pages, NULL); |
@@ -750,9 +750,9 @@ videobuf_read_zerocopy(struct videobuf_queue *q, char __user *data, | |||
750 | { | 750 | { |
751 | enum v4l2_field field; | 751 | enum v4l2_field field; |
752 | unsigned long flags; | 752 | unsigned long flags; |
753 | int retval; | 753 | int retval; |
754 | 754 | ||
755 | /* setup stuff */ | 755 | /* setup stuff */ |
756 | retval = -ENOMEM; | 756 | retval = -ENOMEM; |
757 | q->read_buf = videobuf_alloc(q->msize); | 757 | q->read_buf = videobuf_alloc(q->msize); |
758 | if (NULL == q->read_buf) | 758 | if (NULL == q->read_buf) |
@@ -760,18 +760,18 @@ videobuf_read_zerocopy(struct videobuf_queue *q, char __user *data, | |||
760 | 760 | ||
761 | q->read_buf->memory = V4L2_MEMORY_USERPTR; | 761 | q->read_buf->memory = V4L2_MEMORY_USERPTR; |
762 | q->read_buf->baddr = (unsigned long)data; | 762 | q->read_buf->baddr = (unsigned long)data; |
763 | q->read_buf->bsize = count; | 763 | q->read_buf->bsize = count; |
764 | field = videobuf_next_field(q); | 764 | field = videobuf_next_field(q); |
765 | retval = q->ops->buf_prepare(q,q->read_buf,field); | 765 | retval = q->ops->buf_prepare(q,q->read_buf,field); |
766 | if (0 != retval) | 766 | if (0 != retval) |
767 | goto done; | 767 | goto done; |
768 | 768 | ||
769 | /* start capture & wait */ | 769 | /* start capture & wait */ |
770 | spin_lock_irqsave(q->irqlock,flags); | 770 | spin_lock_irqsave(q->irqlock,flags); |
771 | q->ops->buf_queue(q,q->read_buf); | 771 | q->ops->buf_queue(q,q->read_buf); |
772 | spin_unlock_irqrestore(q->irqlock,flags); | 772 | spin_unlock_irqrestore(q->irqlock,flags); |
773 | retval = videobuf_waiton(q->read_buf,0,0); | 773 | retval = videobuf_waiton(q->read_buf,0,0); |
774 | if (0 == retval) { | 774 | if (0 == retval) { |
775 | videobuf_dma_pci_sync(q->pci,&q->read_buf->dma); | 775 | videobuf_dma_pci_sync(q->pci,&q->read_buf->dma); |
776 | if (STATE_ERROR == q->read_buf->state) | 776 | if (STATE_ERROR == q->read_buf->state) |
777 | retval = -EIO; | 777 | retval = -EIO; |
@@ -828,7 +828,7 @@ ssize_t videobuf_read_one(struct videobuf_queue *q, | |||
828 | } | 828 | } |
829 | 829 | ||
830 | /* wait until capture is done */ | 830 | /* wait until capture is done */ |
831 | retval = videobuf_waiton(q->read_buf, nonblocking, 1); | 831 | retval = videobuf_waiton(q->read_buf, nonblocking, 1); |
832 | if (0 != retval) | 832 | if (0 != retval) |
833 | goto done; | 833 | goto done; |
834 | videobuf_dma_pci_sync(q->pci,&q->read_buf->dma); | 834 | videobuf_dma_pci_sync(q->pci,&q->read_buf->dma); |
@@ -1096,7 +1096,7 @@ videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr, | |||
1096 | 1096 | ||
1097 | dprintk(3,"nopage: fault @ %08lx [vma %08lx-%08lx]\n", | 1097 | dprintk(3,"nopage: fault @ %08lx [vma %08lx-%08lx]\n", |
1098 | vaddr,vma->vm_start,vma->vm_end); | 1098 | vaddr,vma->vm_start,vma->vm_end); |
1099 | if (vaddr > vma->vm_end) | 1099 | if (vaddr > vma->vm_end) |
1100 | return NOPAGE_SIGBUS; | 1100 | return NOPAGE_SIGBUS; |
1101 | page = alloc_page(GFP_USER); | 1101 | page = alloc_page(GFP_USER); |
1102 | if (!page) | 1102 | if (!page) |