aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-11-26 12:55:17 -0500
committerJonathan Cameron <jic23@kernel.org>2014-12-12 07:28:34 -0500
commit374956600ecbedf5ca29c76bde114160eb805091 (patch)
tree2276389687295dfa2d3704795e6b8a6b1b52257b /include/linux/iio
parent8d92db2827b68206f6930e79132243416183e083 (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 'include/linux/iio')
-rw-r--r--include/linux/iio/buffer.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h
index 16b7663036f2..b65850a41127 100644
--- a/include/linux/iio/buffer.h
+++ b/include/linux/iio/buffer.h
@@ -26,7 +26,6 @@ struct iio_buffer;
26 * @request_update: if a parameter change has been marked, update underlying 26 * @request_update: if a parameter change has been marked, update underlying
27 * storage. 27 * storage.
28 * @set_bytes_per_datum:set number of bytes per datum 28 * @set_bytes_per_datum:set number of bytes per datum
29 * @get_length: get number of datums in buffer
30 * @set_length: set number of datums in buffer 29 * @set_length: set number of datums in buffer
31 * @release: called when the last reference to the buffer is dropped, 30 * @release: called when the last reference to the buffer is dropped,
32 * should free all resources allocated by the buffer. 31 * should free all resources allocated by the buffer.
@@ -49,7 +48,6 @@ struct iio_buffer_access_funcs {
49 int (*request_update)(struct iio_buffer *buffer); 48 int (*request_update)(struct iio_buffer *buffer);
50 49
51 int (*set_bytes_per_datum)(struct iio_buffer *buffer, size_t bpd); 50 int (*set_bytes_per_datum)(struct iio_buffer *buffer, size_t bpd);
52 int (*get_length)(struct iio_buffer *buffer);
53 int (*set_length)(struct iio_buffer *buffer, int length); 51 int (*set_length)(struct iio_buffer *buffer, int length);
54 52
55 void (*release)(struct iio_buffer *buffer); 53 void (*release)(struct iio_buffer *buffer);