From d89e4e89f9aaa7b501f71e1a75af058f15156a7a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 6 Feb 2020 19:17:55 +0100 Subject: [PATCH] ANDROID: remove map/unmap from ion_dma.c map/unmap is now gone from dma buf operations. I commented out these things in the big dma-buf merge point for 5.6-rc1, but to call it out specifically I am removing it here so that everyone can notice what just happened. And if this is an issue, they can fix it up properly :) Bug: 133508579 Cc: Isaac J. Manjarres Cc: Sandeep Patil Signed-off-by: Greg Kroah-Hartman Change-Id: I22dd274529cf5b527ab77eac2a4113baa20693c1 --- drivers/staging/android/ion/ion_dma_buf.c | 28 ----------------------- 1 file changed, 28 deletions(-) diff --git a/drivers/staging/android/ion/ion_dma_buf.c b/drivers/staging/android/ion/ion_dma_buf.c index 49635367e11f..6b77a2fbb67a 100644 --- a/drivers/staging/android/ion/ion_dma_buf.c +++ b/drivers/staging/android/ion/ion_dma_buf.c @@ -234,19 +234,6 @@ static int ion_dma_buf_end_cpu_access_partial(struct dma_buf *dmabuf, len); } -#if 0 -static void *ion_dma_buf_map(struct dma_buf *dmabuf, unsigned long offset) -{ - struct ion_buffer *buffer = dmabuf->priv; - struct ion_heap *heap = buffer->heap; - - if (heap->buf_ops.map) - return heap->buf_ops.map(dmabuf, offset); - - return ion_buffer_kmap_get(buffer) + offset * PAGE_SIZE; -} -#endif - static int ion_dma_buf_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) { struct ion_buffer *buffer = dmabuf->priv; @@ -272,19 +259,6 @@ static int ion_dma_buf_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) return ret; } -#if 0 -static void ion_dma_buf_unmap(struct dma_buf *dmabuf, unsigned long offset, - void *addr) -{ - struct ion_buffer *buffer = dmabuf->priv; - struct ion_heap *heap = buffer->heap; - - if (!heap->buf_ops.unmap) - return; - heap->buf_ops.unmap(dmabuf, offset, addr); -} -#endif - static void *ion_dma_buf_vmap(struct dma_buf *dmabuf) { struct ion_buffer *buffer = dmabuf->priv; @@ -329,8 +303,6 @@ static const struct dma_buf_ops dma_buf_ops = { .end_cpu_access = ion_dma_buf_end_cpu_access, .end_cpu_access_partial = ion_dma_buf_end_cpu_access_partial, .mmap = ion_dma_buf_mmap, -// .map = ion_dma_buf_map, -// .unmap = ion_dma_buf_unmap, .vmap = ion_dma_buf_vmap, .vunmap = ion_dma_buf_vunmap, .get_flags = ion_dma_buf_get_flags,