diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2019-12-11 13:43:00 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-12-29 18:20:09 +0300 |
commit | f6d4033d2a14b454680585d4ab974d163fcd7a47 (patch) | |
tree | e8f489a361118425a9ff545ec04f6e337f3b2c03 /drivers/iio/industrialio-buffer.c | |
parent | 4538c185680996d7328beac629dbdb7dd3f8f34e (diff) | |
download | linux-f6d4033d2a14b454680585d4ab974d163fcd7a47.tar.xz |
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/industrialio-buffer.c')
-rw-r--r-- | drivers/iio/industrialio-buffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index c193d64e5217..dbbf0cf4cac9 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c @@ -87,7 +87,7 @@ static bool iio_buffer_ready(struct iio_dev *indio_dev, struct iio_buffer *buf, } /** - * iio_buffer_read_first_n_outer() - chrdev read for buffer access + * iio_buffer_read_outer() - chrdev read for buffer access * @filp: File structure pointer for the char device * @buf: Destination buffer for iio buffer read * @n: First n bytes to read @@ -99,8 +99,8 @@ static bool iio_buffer_ready(struct iio_dev *indio_dev, struct iio_buffer *buf, * Return: negative values corresponding to error codes or ret != 0 * for ending the reading activity **/ -ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf, - size_t n, loff_t *f_ps) +ssize_t iio_buffer_read_outer(struct file *filp, char __user *buf, + size_t n, loff_t *f_ps) { struct iio_dev *indio_dev = filp->private_data; struct iio_buffer *rb = indio_dev->buffer; @@ -112,7 +112,7 @@ ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf, if (!indio_dev->info) return -ENODEV; - if (!rb || !rb->access->read_first_n) + if (!rb || !rb->access->read) return -EINVAL; datum_size = rb->bytes_per_datum; @@ -147,7 +147,7 @@ ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf, continue; } - ret = rb->access->read_first_n(rb, n, buf); + ret = rb->access->read(rb, n, buf); if (ret == 0 && (filp->f_flags & O_NONBLOCK)) ret = -EAGAIN; } while (ret == 0); |