gpu: ion: fix page offset in dma_buf_kmap()
authorGreg Hackmann <ghackmann@google.com>
Fri, 13 Dec 2013 22:24:00 +0000 (14:24 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2013 16:55:38 +0000 (08:55 -0800)
Signed-off-by: Greg Hackmann <ghackmann@google.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c

index 4d91d20a4a810b8452e3a0677772ac125f9e0524..84229bd9bfbca759f3235267a5141dee234c0708 100644 (file)
@@ -846,7 +846,7 @@ static void ion_dma_buf_release(struct dma_buf *dmabuf)
 static void *ion_dma_buf_kmap(struct dma_buf *dmabuf, unsigned long offset)
 {
        struct ion_buffer *buffer = dmabuf->priv;
-       return buffer->vaddr + offset;
+       return buffer->vaddr + offset * PAGE_SIZE;
 }
 
 static void ion_dma_buf_kunmap(struct dma_buf *dmabuf, unsigned long offset,