diff options
| author | Nuno Sá <nuno.sa@analog.com> | 2025-12-19 15:28:14 +0000 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-12-21 11:58:01 +0000 |
| commit | 247a357a9101b76d832b7e19d85ba8dcfb3e3e8d (patch) | |
| tree | 658d280e348a0ce7cff69eb414c5905f314e6843 /drivers/iio/buffer | |
| parent | 07d6dc1708838e94e3da7294e601adf8da1d9414 (diff) | |
iio: buffer-dma: Turn iio_dma_buffer_init() void
iio_dma_buffer_init() always return 0. Therefore there's no point in
returning int.
While at it, fix a mismatch between the function declaration and definition
regarding the struct device (dma_dev != dev).
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/buffer')
| -rw-r--r-- | drivers/iio/buffer/industrialio-buffer-dma.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/iio/buffer/industrialio-buffer-dma.c b/drivers/iio/buffer/industrialio-buffer-dma.c index 49d1bff5242a..ed187bb23708 100644 --- a/drivers/iio/buffer/industrialio-buffer-dma.c +++ b/drivers/iio/buffer/industrialio-buffer-dma.c @@ -826,8 +826,8 @@ EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_set_length, "IIO_DMA_BUFFER"); * should refer to the device that will perform the DMA to ensure that * allocations are done from a memory region that can be accessed by the device. */ -int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, - struct device *dev, const struct iio_dma_buffer_ops *ops) +void iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, struct device *dev, + const struct iio_dma_buffer_ops *ops) { iio_buffer_init(&queue->buffer); queue->buffer.length = PAGE_SIZE; @@ -839,8 +839,6 @@ int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, mutex_init(&queue->lock); spin_lock_init(&queue->list_lock); - - return 0; } EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_init, "IIO_DMA_BUFFER"); |
