iio: buffer-dmaengine: add dev-managed calls for buffer alloc
Currently, when using a 'iio_dmaengine_buffer_alloc()', an matching call to 'iio_dmaengine_buffer_free()' must be made. With this change, this can be avoided by using 'devm_iio_dmaengine_buffer_alloc()'. The buffer will get free'd via the device's devres handling. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:

committed by
Jonathan Cameron

parent
6eb3b8acfd
commit
e0fcca9fbd
@@ -14,4 +14,7 @@ struct iio_buffer *iio_dmaengine_buffer_alloc(struct device *dev,
|
||||
const char *channel);
|
||||
void iio_dmaengine_buffer_free(struct iio_buffer *buffer);
|
||||
|
||||
struct iio_buffer *devm_iio_dmaengine_buffer_alloc(struct device *dev,
|
||||
const char *channel);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user