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

Jens Axboe
2024-04-11T15:39:17Z

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