static void iio_buffer_block_release(struct kref *kref) { struct iio_dma_buffer_block *block = container_of(kref, struct iio_dma_buffer_block, kref); WARN_ON(block->state != IIO_BLOCK_STATE_DEAD); dma_free_coherent(block->queue->dev, PAGE_ALIGN(block->size), block->vaddr, block->phys_addr); iio_buffer_put(&block->queue->buffer); kfree(block); }
void iio_kfifo_free(struct iio_buffer *r) { iio_buffer_put(r); }