diff --git a/drivers/dma-buf/rk_heaps/rk-dma-heap.c b/drivers/dma-buf/rk_heaps/rk-dma-heap.c index def5252336b3..1c68a7549e8a 100644 --- a/drivers/dma-buf/rk_heaps/rk-dma-heap.c +++ b/drivers/dma-buf/rk_heaps/rk-dma-heap.c @@ -361,6 +361,7 @@ void rk_dma_heap_put(struct rk_dma_heap *h) kref_put(&h->refcount, rk_dma_heap_release); mutex_unlock(&rk_heap_list_lock); } +EXPORT_SYMBOL_GPL(rk_dma_heap_put); /** * rk_dma_heap_get_dev() - get device struct for the heap diff --git a/include/linux/rk-dma-heap.h b/include/linux/rk-dma-heap.h index 01a1bb50de36..f9b06cc18068 100644 --- a/include/linux/rk-dma-heap.h +++ b/include/linux/rk-dma-heap.h @@ -33,6 +33,12 @@ static inline int rk_dma_heap_cma_setup(void) */ int rk_dma_heap_set_dev(struct device *heap_dev); +/** + * rk_dma_heap_put - drops a reference to a dmabuf heaps, potentially freeing it + * @heap: heap pointer + */ +void rk_dma_heap_put(struct rk_dma_heap *heap); + /** * rk_dma_heap_find - Returns the registered dma_heap with the specified name * @name: Name of the heap to find @@ -100,6 +106,10 @@ static inline int rk_dma_heap_set_dev(struct device *heap_dev) return -ENODEV; } +static inline void rk_dma_heap_put(struct rk_dma_heap *heap) +{ +} + static inline struct rk_dma_heap *rk_dma_heap_find(const char *name) { return NULL;