Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176811
b: refs/heads/master
c: 31bedfa
h: refs/heads/master
i:
  176809: 193a4c9
  176807: ab3da02
v: v3
  • Loading branch information
Muralidharan Karicheri authored and Mauro Carvalho Chehab committed Dec 16, 2009
1 parent 9a7a8b8 commit b847d48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 0d94e29459d372b6c5dda964a8b35a8d40050ca7
refs/heads/master: 31bedfa5068936b15a388842be1d03cdd1bdfb07
6 changes: 4 additions & 2 deletions trunk/drivers/media/video/videobuf-dma-contig.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,11 @@ static int videobuf_dma_contig_user_get(struct videobuf_dma_contig_memory *mem,
struct vm_area_struct *vma;
unsigned long prev_pfn, this_pfn;
unsigned long pages_done, user_address;
unsigned int offset;
int ret;

mem->size = PAGE_ALIGN(vb->size);
offset = vb->baddr & ~PAGE_MASK;
mem->size = PAGE_ALIGN(vb->size + offset);
mem->is_userptr = 0;
ret = -EINVAL;

Expand All @@ -166,7 +168,7 @@ static int videobuf_dma_contig_user_get(struct videobuf_dma_contig_memory *mem,
break;

if (pages_done == 0)
mem->dma_handle = this_pfn << PAGE_SHIFT;
mem->dma_handle = (this_pfn << PAGE_SHIFT) + offset;
else if (this_pfn != (prev_pfn + 1))
ret = -EFAULT;

Expand Down

0 comments on commit b847d48

Please sign in to comment.