Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76540
b: refs/heads/master
c: 105354a
h: refs/heads/master
v: v3
  • Loading branch information
Nick Piggin authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 083eab2 commit 1b112cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14e3c152a14cb96b5f584d3885d2aedf1a1353fc
refs/heads/master: 105354a0f0410d4715f38e67d5790dead5dafdad
20 changes: 8 additions & 12 deletions trunk/drivers/media/video/videobuf-dma-sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,30 +385,26 @@ videobuf_vm_close(struct vm_area_struct *vma)
* now ...). Bounce buffers don't work very well for the data rates
* video capture has.
*/
static struct page*
videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr,
int *type)
static int
videobuf_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
{
struct page *page;

dprintk(3,"nopage: fault @ %08lx [vma %08lx-%08lx]\n",
vaddr,vma->vm_start,vma->vm_end);
if (vaddr > vma->vm_end)
return NOPAGE_SIGBUS;
dprintk(3,"fault: fault @ %08lx [vma %08lx-%08lx]\n",
(unsigned long)vmf->virtual_address,vma->vm_start,vma->vm_end);
page = alloc_page(GFP_USER | __GFP_DMA32);
if (!page)
return NOPAGE_OOM;
return VM_FAULT_OOM;
clear_user_page(page_address(page), vaddr, page);
if (type)
*type = VM_FAULT_MINOR;
return page;
vmf->page = page;
return 0;
}

static struct vm_operations_struct videobuf_vm_ops =
{
.open = videobuf_vm_open,
.close = videobuf_vm_close,
.nopage = videobuf_vm_nopage,
.fault = videobuf_vm_fault,
};

/* ---------------------------------------------------------------------
Expand Down

0 comments on commit 1b112cc

Please sign in to comment.