Commit 999517f6742b4ca4692c041752afc4298fbbf0da

Authored by Lars-Peter Clausen
Committed by Jonathan Cameron
1 parent 872e79add7

staging:iio: Remove noop call to __iio_update_buffer

__iio_update_buffer updates the buffer's bytes_per_datum and length fields.
But the only user of this function just passes in these exact fields, so the
call basically looks like this:

	buffer->bytes_per_datum = buffer->bytes_per_datum;
	buffer->length = buffer->length;

Which means it is a noop and can be removed. Also remove the function itself,
since it is now unused.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

Showing 2 changed files with 0 additions and 14 deletions Side-by-side Diff

drivers/iio/kfifo_buf.c
... ... @@ -22,7 +22,6 @@
22 22 if ((length == 0) || (bytes_per_datum == 0))
23 23 return -EINVAL;
24 24  
25   - __iio_update_buffer(&buf->buffer, bytes_per_datum, length);
26 25 return __kfifo_alloc((struct __kfifo *)&buf->kf, length,
27 26 bytes_per_datum, GFP_KERNEL);
28 27 }
include/linux/iio/buffer.h
... ... @@ -103,19 +103,6 @@
103 103 **/
104 104 void iio_buffer_init(struct iio_buffer *buffer);
105 105  
106   -/**
107   - * __iio_update_buffer() - update common elements of buffers
108   - * @buffer: buffer that is the event source
109   - * @bytes_per_datum: size of individual datum including timestamp
110   - * @length: number of datums in buffer
111   - **/
112   -static inline void __iio_update_buffer(struct iio_buffer *buffer,
113   - int bytes_per_datum, int length)
114   -{
115   - buffer->bytes_per_datum = bytes_per_datum;
116   - buffer->length = length;
117   -}
118   -
119 106 int iio_scan_mask_query(struct iio_dev *indio_dev,
120 107 struct iio_buffer *buffer, int bit);
121 108