[PATCH 391/437] EDAC/i5100: convert to read/write iterators

From: Jens Axboe
Date: Thu Apr 11 2024 - 13:09:39 EST


Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
---
drivers/edac/i5100_edac.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c
index d470afe65001..d35064a74fe2 100644
--- a/drivers/edac/i5100_edac.c
+++ b/drivers/edac/i5100_edac.c
@@ -924,20 +924,19 @@ static void i5100_do_inject(struct mem_ctl_info *mci)
}

#define to_mci(k) container_of(k, struct mem_ctl_info, dev)
-static ssize_t inject_enable_write(struct file *file, const char __user *data,
- size_t count, loff_t *ppos)
+static ssize_t inject_enable_write(struct kiocb *iocb, struct iov_iter *from)
{
- struct device *dev = file->private_data;
+ struct device *dev = iocb->ki_filp->private_data;
struct mem_ctl_info *mci = to_mci(dev);

i5100_do_inject(mci);

- return count;
+ return iov_iter_count(from);
}

static const struct file_operations i5100_inject_enable_fops = {
.open = simple_open,
- .write = inject_enable_write,
+ .write_iter = inject_enable_write,
.llseek = generic_file_llseek,
};

--
2.43.0