[PATCH 034/437] char/sonypi: convert to read/write iterators

Jens Axboe posted 437 patches 1 year, 8 months ago
[PATCH 034/437] char/sonypi: convert to read/write iterators
Posted by Jens Axboe 1 year, 8 months ago
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 drivers/char/sonypi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index 22d249333f53..2bb9f0a17989 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -925,6 +925,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf,
 
 	return ret;
 }
+FOPS_READ_ITER_HELPER(sonypi_misc_read);
 
 static __poll_t sonypi_misc_poll(struct file *file, poll_table *wait)
 {
@@ -1048,7 +1049,7 @@ static long sonypi_misc_ioctl(struct file *fp,
 
 static const struct file_operations sonypi_misc_fops = {
 	.owner		= THIS_MODULE,
-	.read		= sonypi_misc_read,
+	.read_iter	= sonypi_misc_read_iter,
 	.poll		= sonypi_misc_poll,
 	.open		= sonypi_misc_open,
 	.release	= sonypi_misc_release,
-- 
2.43.0