iio: adc: ad7768-1: Move buffer allocation to a separate function
authorSergiu Cuciurean <sergiu.cuciurean@analog.com>
Fri, 11 Apr 2025 15:57:23 +0000 (12:57 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 22 Apr 2025 18:10:04 +0000 (19:10 +0100)
commitef24ea86eff5dc82f877e2057330da3c463f17cf
tree08614ab6ec4f460df9d7978983e8dc46c60665eb
parent1fa0f4ea5660bf4731cf8f51c4ad923070b27fc8
iio: adc: ad7768-1: Move buffer allocation to a separate function

This change moves the buffer allocation and related trigger allocation
in a separate function, making space for adding another type of iio
buffer if needed.

Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com>
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
Link: https://patch.msgid.link/11c1777b406875ce1a7216dc4b094ff99af8da7f.1744325346.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7768-1.c