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

Commit 2b4444ff authored by Sandeep Patil's avatar Sandeep Patil
Browse files

staging: ion: export ion_free() for ion_heaps.



ion_free() is a generic function needed to release
an ion buffer back to the heap. So, export it for the
heap module.

Bug: 140294230
Test: ion-unit-tests

Change-Id: Iaa467ab3df18fa219412dd9f5913cd022a93455d
Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
parent 19a4939e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ int ion_free(struct ion_buffer *buffer)
{
	return ion_buffer_destroy(internal_dev, buffer);
}
EXPORT_SYMBOL_GPL(ion_free);

static int ion_alloc_fd(size_t len, unsigned int heap_id_mask,
			unsigned int flags)
+12 −0
Original line number Diff line number Diff line
@@ -293,6 +293,13 @@ int ion_buffer_zero(struct ion_buffer *buffer);
struct dma_buf *ion_alloc(size_t len, unsigned int heap_id_mask,
			  unsigned int flags);

/**
 * ion_free - Releases the ion buffer.
 *
 * @buffer:             ion buffer to be released
 */
int ion_free(struct ion_buffer *buffer);

#else

static inline int __ion_device_add_heap(struct ion_heap *heap,
@@ -357,5 +364,10 @@ static inline struct dma_buf *ion_alloc(size_t len, unsigned int heap_id_mask,
	return ERR_PTR(-ENOMEM);
}

static inline int ion_free(struct ion_buffer *buffer)
{
	return 0;
}

#endif /* CONFIG_ION */
#endif /* _ION_KERNEL_H */