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: Sandeep Patil <sspatil@google.com>
This commit is contained in:
Sandeep Patil
2019-09-10 05:13:51 -07:00
parent 19a4939e67
commit 2b4444ffaf
2 changed files with 13 additions and 0 deletions

View File

@@ -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 */