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

Jens Axboe posted 437 patches 1 year, 8 months ago
[PATCH 116/437] drivers/counter: convert to read/write iterators
Posted by Jens Axboe 1 year, 8 months ago
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 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