mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
iio: buffer-dma: Rename iio_dma_buffer_data_available()
Change its name to iio_dma_buffer_usage(), as this function can be used both for the .data_available and the .space_available callbacks. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240419-iio-backend-axi-dac-v4-2-5ca45b4de294@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
a094de22e2
commit
04ae3b1a76
3 changed files with 8 additions and 7 deletions
|
@ -547,13 +547,14 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n,
|
|||
EXPORT_SYMBOL_GPL(iio_dma_buffer_read);
|
||||
|
||||
/**
|
||||
* iio_dma_buffer_data_available() - DMA buffer data_available callback
|
||||
* iio_dma_buffer_usage() - DMA buffer data_available and
|
||||
* space_available callback
|
||||
* @buf: Buffer to check for data availability
|
||||
*
|
||||
* Should be used as the data_available callback for iio_buffer_access_ops
|
||||
* struct for DMA buffers.
|
||||
* Should be used as the data_available and space_available callbacks for
|
||||
* iio_buffer_access_ops struct for DMA buffers.
|
||||
*/
|
||||
size_t iio_dma_buffer_data_available(struct iio_buffer *buf)
|
||||
size_t iio_dma_buffer_usage(struct iio_buffer *buf)
|
||||
{
|
||||
struct iio_dma_buffer_queue *queue = iio_buffer_to_queue(buf);
|
||||
struct iio_dma_buffer_block *block;
|
||||
|
@ -586,7 +587,7 @@ size_t iio_dma_buffer_data_available(struct iio_buffer *buf)
|
|||
|
||||
return data_available;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(iio_dma_buffer_data_available);
|
||||
EXPORT_SYMBOL_GPL(iio_dma_buffer_usage);
|
||||
|
||||
/**
|
||||
* iio_dma_buffer_set_bytes_per_datum() - DMA buffer set_bytes_per_datum callback
|
||||
|
|
|
@ -117,7 +117,7 @@ static const struct iio_buffer_access_funcs iio_dmaengine_buffer_ops = {
|
|||
.request_update = iio_dma_buffer_request_update,
|
||||
.enable = iio_dma_buffer_enable,
|
||||
.disable = iio_dma_buffer_disable,
|
||||
.data_available = iio_dma_buffer_data_available,
|
||||
.data_available = iio_dma_buffer_usage,
|
||||
.release = iio_dmaengine_buffer_release,
|
||||
|
||||
.modes = INDIO_BUFFER_HARDWARE,
|
||||
|
|
|
@ -132,7 +132,7 @@ int iio_dma_buffer_disable(struct iio_buffer *buffer,
|
|||
struct iio_dev *indio_dev);
|
||||
int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n,
|
||||
char __user *user_buffer);
|
||||
size_t iio_dma_buffer_data_available(struct iio_buffer *buffer);
|
||||
size_t iio_dma_buffer_usage(struct iio_buffer *buffer);
|
||||
int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd);
|
||||
int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length);
|
||||
int iio_dma_buffer_request_update(struct iio_buffer *buffer);
|
||||
|
|
Loading…
Reference in a new issue