ANDROID: staging: ion: move definition of attachment

The ion_dma_buf_attachment definition that is connected
to attachment of ion_buffer is used by dma buf ops.
However this definition should be available for heap's
dma buf ops as well as for built-in dma buf ops.
Therefore we move this definition to the ion header.

Bug: 151780326

Signed-off-by: Hyesoo Yu <hyesoo.yu@samsung.com>
Change-Id: Ib3023e29f48b1e2502f8d750af6645f65f6eea40
(cherry picked from commit 7e27ee5fc8)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
This commit is contained in:
Hyesoo Yu
2020-03-05 15:33:07 +09:00
committed by Hridya Valsaraju
parent 7b16525b2a
commit 4e8ed5ad98
2 changed files with 12 additions and 6 deletions

View File

@@ -45,12 +45,6 @@ static void free_duped_table(struct sg_table *table)
kfree(table);
}
struct ion_dma_buf_attachment {
struct device *dev;
struct sg_table *table;
struct list_head list;
};
static int ion_dma_buf_attach(struct dma_buf *dmabuf,
struct dma_buf_attachment *attachment)
{

View File

@@ -144,6 +144,18 @@ struct ion_heap {
#define ion_device_add_heap(heap) __ion_device_add_heap(heap, THIS_MODULE)
/**
* struct ion_dma_buf_attachment - hold device-table attachment data for buffer
* @dev: device attached to the buffer.
* @table: cached mapping.
* @list: list of ion_dma_buf_attachment.
*/
struct ion_dma_buf_attachment {
struct device *dev;
struct sg_table *table;
struct list_head list;
};
#ifdef CONFIG_ION
/**