iio: Remove get_bytes_per_datum() from iio_buffer_access_funcs
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 26 Nov 2014 17:55:13 +0000 (18:55 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 12 Dec 2014 12:28:32 +0000 (12:28 +0000)
There haven't been any users of the get_bytes_per_datum() callback for a
while. The core assumes that the number of bytes per datum can be calculated
based on the enabled channels and the storage size of the channel and
iio_compute_scan_bytes() is used to compute this number. So remove the
callback.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/kfifo_buf.c
drivers/staging/iio/Documentation/ring.txt
drivers/staging/iio/accel/sca3000_ring.c
include/linux/iio/buffer.h

index 7134e8a..1258b4e 100644 (file)
@@ -66,11 +66,6 @@ static struct attribute_group iio_kfifo_attribute_group = {
        .name = "buffer",
 };
 
-static int iio_get_bytes_per_datum_kfifo(struct iio_buffer *r)
-{
-       return r->bytes_per_datum;
-}
-
 static int iio_mark_update_needed_kfifo(struct iio_buffer *r)
 {
        struct iio_kfifo *kf = iio_to_kfifo(r);
@@ -159,7 +154,6 @@ static const struct iio_buffer_access_funcs kfifo_access_funcs = {
        .read_first_n = &iio_read_first_n_kfifo,
        .data_available = iio_kfifo_buf_data_available,
        .request_update = &iio_request_update_kfifo,
-       .get_bytes_per_datum = &iio_get_bytes_per_datum_kfifo,
        .set_bytes_per_datum = &iio_set_bytes_per_datum_kfifo,
        .get_length = &iio_get_length_kfifo,
        .set_length = &iio_set_length_kfifo,
Simple merge