[PATCH 237/437] watchdog: at91rm9200_wdt: convert to read/write iterators

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

diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c
index 558015f08c7a..1860fbeb6e57 100644
--- a/drivers/watchdog/at91rm9200_wdt.c
+++ b/drivers/watchdog/at91rm9200_wdt.c
@@ -199,11 +199,10 @@ static long at91_wdt_ioctl(struct file *file,
 /*
  * Pat the watchdog whenever device is written to.
  */
-static ssize_t at91_wdt_write(struct file *file, const char *data,
-						size_t len, loff_t *ppos)
+static ssize_t at91_wdt_write(struct kiocb *iocb, struct iov_iter *from)
 {
 	at91_wdt_reload();		/* pat the watchdog */
-	return len;
+	return iov_iter_count(from);
 }
 
 /* ......................................................................... */
@@ -215,7 +214,7 @@ static const struct file_operations at91wdt_fops = {
 	.compat_ioctl	= compat_ptr_ioctl,
 	.open		= at91_wdt_open,
 	.release	= at91_wdt_close,
-	.write		= at91_wdt_write,
+	.write_iter	= at91_wdt_write,
 };
 
 static struct miscdevice at91wdt_miscdev = {
-- 
2.43.0