lkml.org 
[lkml]   [2024]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 267/437] watchdog: indydog: convert to read/write iterators
Date
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
drivers/watchdog/indydog.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/watchdog/indydog.c b/drivers/watchdog/indydog.c
index 9857bb74a723..967a95a886a4 100644
--- a/drivers/watchdog/indydog.c
+++ b/drivers/watchdog/indydog.c
@@ -86,9 +86,9 @@ static int indydog_release(struct inode *inode, struct file *file)
return 0;
}

-static ssize_t indydog_write(struct file *file, const char *data,
- size_t len, loff_t *ppos)
+static ssize_t indydog_write(struct kiocb *iocb, struct iov_iter *from)
{
+ size_t len = iov_iter_count(from);
/* Refresh the timer. */
if (len)
indydog_ping();
@@ -150,7 +150,7 @@ static int indydog_notify_sys(struct notifier_block *this,
static const struct file_operations indydog_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
- .write = indydog_write,
+ .write_iter = indydog_write,
.unlocked_ioctl = indydog_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.open = indydog_open,
--
2.43.0

\
 
 \ /
  Last update: 2024-05-27 16:36    [W:1.028 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site