[PATCH 116/437] drivers/counter: convert to read/write iterators

From: Jens Axboe
Date: Thu Apr 11 2024 - 12:06:37 EST


Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
---
drivers/counter/counter-chrdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/counter/counter-chrdev.c b/drivers/counter/counter-chrdev.c
index afc94d0062b1..f2d513248120 100644
--- a/drivers/counter/counter-chrdev.c
+++ b/drivers/counter/counter-chrdev.c
@@ -99,6 +99,7 @@ static ssize_t counter_chrdev_read(struct file *filp, char __user *buf,

return copied;
}
+FOPS_READ_ITER_HELPER(counter_chrdev_read);

static __poll_t counter_chrdev_poll(struct file *filp,
struct poll_table_struct *pollt)
@@ -455,7 +456,7 @@ static int counter_chrdev_release(struct inode *inode, struct file *filp)
static const struct file_operations counter_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
- .read = counter_chrdev_read,
+ .read_iter = counter_chrdev_read_iter,
.poll = counter_chrdev_poll,
.unlocked_ioctl = counter_chrdev_ioctl,
.open = counter_chrdev_open,
--
2.43.0