diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-26 18:55:17 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-12-12 12:28:34 +0000 |
commit | 374956600ecbedf5ca29c76bde114160eb805091 (patch) | |
tree | 2276389687295dfa2d3704795e6b8a6b1b52257b /drivers/iio/kfifo_buf.c | |
parent | 8d92db2827b68206f6930e79132243416183e083 (diff) |
iio: buffer: Drop get_length callback
We already do have the length field in the struct iio_buffer which is
expected to be in sync with the current size of the buffer. And currently
all implementations of the get_length callback either return this field or a
constant number.
This patch removes the get_length callback and replaces all occurrences in
the IIO core with directly accessing the length field of the buffer.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/kfifo_buf.c')
-rw-r--r-- | drivers/iio/kfifo_buf.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/iio/kfifo_buf.c b/drivers/iio/kfifo_buf.c index 3b0a3bc4f0ad..b20a9cfbc8ed 100644 --- a/drivers/iio/kfifo_buf.c +++ b/drivers/iio/kfifo_buf.c @@ -47,11 +47,6 @@ static int iio_request_update_kfifo(struct iio_buffer *r) return ret; } -static int iio_get_length_kfifo(struct iio_buffer *r) -{ - return r->length; -} - static int iio_mark_update_needed_kfifo(struct iio_buffer *r) { struct iio_kfifo *kf = iio_to_kfifo(r); @@ -141,7 +136,6 @@ static const struct iio_buffer_access_funcs kfifo_access_funcs = { .data_available = iio_kfifo_buf_data_available, .request_update = &iio_request_update_kfifo, .set_bytes_per_datum = &iio_set_bytes_per_datum_kfifo, - .get_length = &iio_get_length_kfifo, .set_length = &iio_set_length_kfifo, .release = &iio_kfifo_buffer_release, }; |