[PATCH 238/437] watchdog: cpu5wdt: convert to read/write iterators

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

diff --git a/drivers/watchdog/cpu5wdt.c b/drivers/watchdog/cpu5wdt.c
index 688b112e712b..cef1d6ba6ecf 100644
--- a/drivers/watchdog/cpu5wdt.c
+++ b/drivers/watchdog/cpu5wdt.c
@@ -174,9 +174,9 @@ static long cpu5wdt_ioctl(struct file *file, unsigned int cmd,
 	return 0;
 }
 
-static ssize_t cpu5wdt_write(struct file *file, const char __user *buf,
-						size_t count, loff_t *ppos)
+static ssize_t cpu5wdt_write(struct kiocb *iocb, struct iov_iter *from)
 {
+	size_t count = iov_iter_count(from);
 	if (!count)
 		return -EIO;
 	cpu5wdt_reset();
@@ -189,7 +189,7 @@ static const struct file_operations cpu5wdt_fops = {
 	.unlocked_ioctl	= cpu5wdt_ioctl,
 	.compat_ioctl	= compat_ptr_ioctl,
 	.open		= cpu5wdt_open,
-	.write		= cpu5wdt_write,
+	.write_iter	= cpu5wdt_write,
 	.release	= cpu5wdt_release,
 };
 
-- 
2.43.0