diff options
author | Rebecca Schultz Zavin <rebecca@android.com> | 2013-12-13 22:23:37 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-14 16:55:36 (GMT) |
commit | 4d5ca3299fb7b27ceb6c33a62bc10ce4d408dc0b (patch) | |
tree | babe703963495316687707a6f3b50975aa65c2e4 /drivers/staging/android/ion/ion_priv.h | |
parent | 0f3cbb59ec47f313e138913c89a1dd0048561355 (diff) | |
download | linux-4d5ca3299fb7b27ceb6c33a62bc10ce4d408dc0b.tar.xz |
ion: Switch map/unmap dma api to sg_tables
Switch these api's from scatterlists to sg_tables
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.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>
Diffstat (limited to 'drivers/staging/android/ion/ion_priv.h')
-rw-r--r-- | drivers/staging/android/ion/ion_priv.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/staging/android/ion/ion_priv.h b/drivers/staging/android/ion/ion_priv.h index cbd9f03..7a77f6f 100644 --- a/drivers/staging/android/ion/ion_priv.h +++ b/drivers/staging/android/ion/ion_priv.h @@ -24,18 +24,6 @@ #include "ion.h" -struct ion_mapping; - -struct ion_dma_mapping { - struct kref ref; - struct scatterlist *sglist; -}; - -struct ion_kernel_mapping { - struct kref ref; - void *vaddr; -}; - struct ion_buffer *ion_handle_buffer(struct ion_handle *handle); /** @@ -54,7 +42,7 @@ struct ion_buffer *ion_handle_buffer(struct ion_handle *handle); * @kmap_cnt: number of times the buffer is mapped to the kernel * @vaddr: the kenrel mapping if kmap_cnt is not zero * @dmap_cnt: number of times the buffer is mapped for dma - * @sglist: the scatterlist for the buffer is dmap_cnt is not zero + * @sg_table: the sg table for the buffer if dmap_cnt is not zero */ struct ion_buffer { struct kref ref; @@ -71,7 +59,7 @@ struct ion_buffer { int kmap_cnt; void *vaddr; int dmap_cnt; - struct scatterlist *sglist; + struct sg_table *sg_table; }; /** @@ -93,7 +81,7 @@ struct ion_heap_ops { void (*free) (struct ion_buffer *buffer); int (*phys) (struct ion_heap *heap, struct ion_buffer *buffer, ion_phys_addr_t *addr, size_t *len); - struct scatterlist *(*map_dma) (struct ion_heap *heap, + struct sg_table *(*map_dma) (struct ion_heap *heap, struct ion_buffer *buffer); void (*unmap_dma) (struct ion_heap *heap, struct ion_buffer *buffer); void * (*map_kernel) (struct ion_heap *heap, struct ion_buffer *buffer); |