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 iio_dev_attr; 9 struct device; 10 11 struct iio_buffer *iio_kfifo_allocate(void); 12 void iio_kfifo_free(struct iio_buffer *r); 13 14 int devm_iio_kfifo_buffer_setup_ext(struct device *dev, 15 struct iio_dev *indio_dev, 16 const struct iio_buffer_setup_ops *setup_ops, 17 const struct iio_dev_attr **buffer_attrs); 18 19 #define devm_iio_kfifo_buffer_setup(dev, indio_dev, setup_ops) \ 20 devm_iio_kfifo_buffer_setup_ext((dev), (indio_dev), (setup_ops), NULL) 21 22 #endif 23