forked from mirrors/linux
		
	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>
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			499 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			499 B
		
	
	
	
		
			C
		
	
	
	
	
	
/* SPDX-License-Identifier: GPL-2.0-or-later */
 | 
						|
/*
 | 
						|
 * Copyright 2014-2015 Analog Devices Inc.
 | 
						|
 *  Author: Lars-Peter Clausen <lars@metafoo.de>
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef __IIO_DMAENGINE_H__
 | 
						|
#define __IIO_DMAENGINE_H__
 | 
						|
 | 
						|
struct iio_buffer;
 | 
						|
struct device;
 | 
						|
 | 
						|
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
 |