[PATCH 151/437] drivers/clk: convert to read/write iterators
From: Jens Axboe
Date: Thu Apr 11 2024 - 12:13:59 EST
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
---
drivers/clk/clk.c | 11 +++++------
drivers/clk/starfive/clk-starfive-jh7110-pll.c | 2 +-
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 25371c91a58f..5a6371a9cad8 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -3539,16 +3539,15 @@ static int current_parent_show(struct seq_file *s, void *data)
DEFINE_SHOW_ATTRIBUTE(current_parent);
#ifdef CLOCK_ALLOW_WRITE_DEBUGFS
-static ssize_t current_parent_write(struct file *file, const char __user *ubuf,
- size_t count, loff_t *ppos)
+static ssize_t current_parent_write(struct kiocb *iocb, struct iov_iter *from)
{
- struct seq_file *s = file->private_data;
+ struct seq_file *s = iocb->ki_filp->private_data;
struct clk_core *core = s->private;
struct clk_core *parent;
u8 idx;
int err;
- err = kstrtou8_from_user(ubuf, count, 0, &idx);
+ err = kstrtou8_from_iter(from, count, 0, &idx);
if (err < 0)
return err;
@@ -3567,8 +3566,8 @@ static ssize_t current_parent_write(struct file *file, const char __user *ubuf,
static const struct file_operations current_parent_rw_fops = {
.open = current_parent_open,
- .write = current_parent_write,
- .read = seq_read,
+ .write_iter = current_parent_write,
+ .read_iter = seq_read_iter,
.llseek = seq_lseek,
.release = single_release,
};
diff --git a/drivers/clk/starfive/clk-starfive-jh7110-pll.c b/drivers/clk/starfive/clk-starfive-jh7110-pll.c
index 3598390e8fd0..1b00fdc92b17 100644
--- a/drivers/clk/starfive/clk-starfive-jh7110-pll.c
+++ b/drivers/clk/starfive/clk-starfive-jh7110-pll.c
@@ -420,7 +420,7 @@ static const struct file_operations jh7110_pll_registers_ops = {
.owner = THIS_MODULE,
.open = jh7110_pll_registers_open,
.release = single_release,
- .read = seq_read,
+ .read_iter = seq_read_iter,
.llseek = seq_lseek
};
--
2.43.0