diff options
author | Jonathan Cameron <jic23@kernel.org> | 2017-01-02 22:28:32 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-01-10 22:54:54 +0300 |
commit | 2b827ad54111439b919605da90e122ecda88bad6 (patch) | |
tree | 2032805699057846a7823fcc890a84e69f3ccb31 /include/linux/iio | |
parent | 19a5a8a5dceeaea03aac6883541b4ec9ed42a833 (diff) | |
download | linux-2b827ad54111439b919605da90e122ecda88bad6.tar.xz |
iio:buffer: Push implementation of iio_device_attach_buffer into .c file
This is a precursor to the splitting of buffer.h into parts relevant
to buffer implementation vs those for devices using buffers.
struct buffer is about to become opaque as far as the header is
concerned.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Diffstat (limited to 'include/linux/iio')
-rw-r--r-- | include/linux/iio/buffer.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h index 8c915c2c18f1..5cdfe2b7d674 100644 --- a/include/linux/iio/buffer.h +++ b/include/linux/iio/buffer.h @@ -194,20 +194,8 @@ bool iio_validate_scan_mask_onehot(struct iio_dev *indio_dev, struct iio_buffer *iio_buffer_get(struct iio_buffer *buffer); void iio_buffer_put(struct iio_buffer *buffer); -/** - * iio_device_attach_buffer - Attach a buffer to a IIO device - * @indio_dev: The device the buffer should be attached to - * @buffer: The buffer to attach to the device - * - * This function attaches a buffer to a IIO device. The buffer stays attached to - * the device until the device is freed. The function should only be called at - * most once per device. - */ -static inline void iio_device_attach_buffer(struct iio_dev *indio_dev, - struct iio_buffer *buffer) -{ - indio_dev->buffer = iio_buffer_get(buffer); -} +void iio_device_attach_buffer(struct iio_dev *indio_dev, + struct iio_buffer *buffer); #else /* CONFIG_IIO_BUFFER */ |