Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e27ee5f authored by Hyesoo Yu's avatar Hyesoo Yu Committed by Todd Kjos
Browse files

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: default avatarHyesoo Yu <hyesoo.yu@samsung.com>
Change-Id: Ib3023e29f48b1e2502f8d750af6645f65f6eea40
parent 13000e57
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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)
{
+12 −0
Original line number Diff line number Diff line
@@ -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

/**