summaryrefslogtreecommitdiff
path: root/include/linux/iio/buffer-dmaengine.h
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2021-02-15 12:40:25 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-03-11 20:47:02 +0000
commita02c09e42b3ed6cefae671e302835f1f04bf474e (patch)
tree1e38d948f95bfec7a5f736c3b7dd3c62b019b4c3 /include/linux/iio/buffer-dmaengine.h
parent99f6e8215b627730e2e6d371430a1f81e8ed6c27 (diff)
iio: buffer-dma,adi-axi-adc: introduce devm_iio_dmaengine_buffer_setup()
This change does a conversion of the devm_iio_dmaengine_buffer_alloc() to devm_iio_dmaengine_buffer_setup(). This will allocate an IIO DMA buffer and attach it to the IIO device, similar to devm_iio_triggered_buffer_setup() (though the underlying code is different, the final logic is the same). Since the only user of the devm_iio_dmaengine_buffer_alloc() was the adi-axi-adc driver, this change does the replacement in a single go in the driver. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210215104043.91251-7-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio/buffer-dmaengine.h')
-rw-r--r--include/linux/iio/buffer-dmaengine.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/iio/buffer-dmaengine.h b/include/linux/iio/buffer-dmaengine.h
index 5b502291d6a4..5c355be89814 100644
--- a/include/linux/iio/buffer-dmaengine.h
+++ b/include/linux/iio/buffer-dmaengine.h
@@ -7,10 +7,11 @@
#ifndef __IIO_DMAENGINE_H__
#define __IIO_DMAENGINE_H__
-struct iio_buffer;
+struct iio_dev;
struct device;
-struct iio_buffer *devm_iio_dmaengine_buffer_alloc(struct device *dev,
- const char *channel);
+int devm_iio_dmaengine_buffer_setup(struct device *dev,
+ struct iio_dev *indio_dev,
+ const char *channel);
#endif