diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-11-20 21:46:04 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-11-20 21:46:04 +0100 |
commit | a69862d8d04e4877965cc938140c9f8e6da0b827 (patch) | |
tree | 667cace5c2fad872871e4d24d0c895664f0e0bc6 /drivers/media/v4l2-core/videobuf-dma-contig.c | |
parent | 0f32fd1900e6b972f289416dbd75e92772b630cb (diff) | |
parent | 01cb156edbbd4e6c4fd8db0d05f18c62c424f9aa (diff) | |
download | blackbird-op-linux-a69862d8d04e4877965cc938140c9f8e6da0b827.tar.gz blackbird-op-linux-a69862d8d04e4877965cc938140c9f8e6da0b827.zip |
Merge branch 'for-linus' into test/usb-resume
Diffstat (limited to 'drivers/media/v4l2-core/videobuf-dma-contig.c')
-rw-r--r-- | drivers/media/v4l2-core/videobuf-dma-contig.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/videobuf-dma-contig.c b/drivers/media/v4l2-core/videobuf-dma-contig.c index bf80f0f7dfb8..e02353e340dd 100644 --- a/drivers/media/v4l2-core/videobuf-dma-contig.c +++ b/drivers/media/v4l2-core/videobuf-dma-contig.c @@ -305,6 +305,15 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q, /* Try to remap memory */ size = vma->vm_end - vma->vm_start; vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); + + /* the "vm_pgoff" is just used in v4l2 to find the + * corresponding buffer data structure which is allocated + * earlier and it does not mean the offset from the physical + * buffer start address as usual. So set it to 0 to pass + * the sanity check in vm_iomap_memory(). + */ + vma->vm_pgoff = 0; + retval = vm_iomap_memory(vma, mem->dma_handle, size); if (retval) { dev_err(q->dev, "mmap: remap failed with error %d. ", |