mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
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>
This commit is contained in:
parent
07d6dc1708
commit
247a357a91
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -157,8 +157,8 @@ 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);
|
||||
|
||||
int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue,
|
||||
struct device *dma_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);
|
||||
void iio_dma_buffer_exit(struct iio_dma_buffer_queue *queue);
|
||||
void iio_dma_buffer_release(struct iio_dma_buffer_queue *queue);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user