1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __LINUX_IIO_KFIFO_BUF_H__ 3 #define __LINUX_IIO_KFIFO_BUF_H__ 4 5 struct iio_buffer; 6 struct iio_buffer_setup_ops; 7 struct iio_dev; 8 struct device; 9 10 struct iio_buffer *iio_kfifo_allocate(void); 11 void iio_kfifo_free(struct iio_buffer *r); 12 13 int devm_iio_kfifo_buffer_setup_ext(struct device *dev, 14 struct iio_dev *indio_dev, 15 int mode_flags, 16 const struct iio_buffer_setup_ops *setup_ops, 17 const struct attribute **buffer_attrs); 18 19 #define devm_iio_kfifo_buffer_setup(dev, indio_dev, mode_flags, setup_ops) \ 20 devm_iio_kfifo_buffer_setup_ext((dev), (indio_dev), (mode_flags), (setup_ops), NULL) 21 22 #endif 23