[PATCH 274/437] watchdog: riowd: convert to read/write iterators

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

diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c
index b293792a292a..d9a85b4c1de2 100644
--- a/drivers/watchdog/riowd.c
+++ b/drivers/watchdog/riowd.c
@@ -145,10 +145,10 @@ static long riowd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 	return 0;
 }
 
-static ssize_t riowd_write(struct file *file, const char __user *buf,
-						size_t count, loff_t *ppos)
+static ssize_t riowd_write(struct kiocb *iocb, struct iov_iter *from)
 {
 	struct riowd *p = riowd_device;
+	size_t count = iov_iter_count(from);
 
 	if (count) {
 		riowd_writereg(p, riowd_timeout, WDTO_INDEX);
@@ -164,7 +164,7 @@ static const struct file_operations riowd_fops = {
 	.unlocked_ioctl =	riowd_ioctl,
 	.compat_ioctl	=	compat_ptr_ioctl,
 	.open =			riowd_open,
-	.write =		riowd_write,
+	.write_iter =		riowd_write,
 	.release =		riowd_release,
 };
 
-- 
2.43.0