use ion handle get/put, we can easyly protect the buffer when we
use it.
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
return handle->buffer;
}
-static void ion_handle_get(struct ion_handle *handle)
+void ion_handle_get(struct ion_handle *handle)
{
kref_get(&handle->ref);
}
*/
struct ion_handle *ion_import_dma_buf(struct ion_client *client, int fd);
+/**
+ * ion_handle_get() - ref ion buffer.
+ */
+void ion_handle_get(struct ion_handle *handle);
+/**
+ * ion_handle_put() - unref ion buffer.
+ */
+int ion_handle_put(struct ion_handle *handle);
+
#ifdef CONFIG_ARCH_ROCKCHIP
struct device;