aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/iio/buffer/kfifo_buf.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2019-12-11 12:43:00 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-12-29 15:20:09 +0000
commitf6d4033d2a14b454680585d4ab974d163fcd7a47 (patch)
treee8f489a361118425a9ff545ec04f6e337f3b2c03 /drivers/iio/buffer/kfifo_buf.c
parentiio: buffer-dmaengine: Report buffer length requirements (diff)
downloadwireguard-linux-f6d4033d2a14b454680585d4ab974d163fcd7a47.tar.xz
wireguard-linux-f6d4033d2a14b454680585d4ab974d163fcd7a47.zip
iio: buffer: rename 'read_first_n' callback to 'read'
It is implied that 'read' will read the first n bytes and not e.g. bytes only from offsets within the buffer that are a prime number. This change is non-functional, mostly just a rename. A secondary intent with this patch is to make room later to add a write callback. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/buffer/kfifo_buf.c')
-rw-r--r--drivers/iio/buffer/kfifo_buf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iio/buffer/kfifo_buf.c b/drivers/iio/buffer/kfifo_buf.c
index e78fc0834e6b..3150f8ab984b 100644
--- a/drivers/iio/buffer/kfifo_buf.c
+++ b/drivers/iio/buffer/kfifo_buf.c
@@ -98,8 +98,7 @@ static int iio_store_to_kfifo(struct iio_buffer *r,
return 0;
}
-static int iio_read_first_n_kfifo(struct iio_buffer *r,
- size_t n, char __user *buf)
+static int iio_read_kfifo(struct iio_buffer *r, size_t n, char __user *buf)
{
int ret, copied;
struct iio_kfifo *kf = iio_to_kfifo(r);
@@ -141,7 +140,7 @@ static void iio_kfifo_buffer_release(struct iio_buffer *buffer)
static const struct iio_buffer_access_funcs kfifo_access_funcs = {
.store_to = &iio_store_to_kfifo,
- .read_first_n = &iio_read_first_n_kfifo,
+ .read = &iio_read_kfifo,
.data_available = iio_kfifo_buf_data_available,
.request_update = &iio_request_update_kfifo,
.set_bytes_per_datum = &iio_set_bytes_per_datum_kfifo,