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:
@@ -41,6 +41,7 @@ int ion_free(struct ion_buffer *buffer)
|
|||||||
{
|
{
|
||||||
return ion_buffer_destroy(internal_dev, 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,
|
static int ion_alloc_fd(size_t len, unsigned int heap_id_mask,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
|
@@ -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,
|
struct dma_buf *ion_alloc(size_t len, unsigned int heap_id_mask,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ion_free - Releases the ion buffer.
|
||||||
|
*
|
||||||
|
* @buffer: ion buffer to be released
|
||||||
|
*/
|
||||||
|
int ion_free(struct ion_buffer *buffer);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline int __ion_device_add_heap(struct ion_heap *heap,
|
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);
|
return ERR_PTR(-ENOMEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int ion_free(struct ion_buffer *buffer)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_ION */
|
#endif /* CONFIG_ION */
|
||||||
#endif /* _ION_KERNEL_H */
|
#endif /* _ION_KERNEL_H */
|
||||||
|
Reference in New Issue
Block a user