[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411153126.16201-418-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:19:17 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 417/437] media/platform: mediatek: convert to read/write iterators
Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
drivers/media/platform/mediatek/vpu/mtk_vpu.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/mediatek/vpu/mtk_vpu.c b/drivers/media/platform/mediatek/vpu/mtk_vpu.c
index 724ae7c2ab3b..ab285cf4bfef 100644
--- a/drivers/media/platform/mediatek/vpu/mtk_vpu.c
+++ b/drivers/media/platform/mediatek/vpu/mtk_vpu.c
@@ -648,14 +648,13 @@ static void vpu_init_ipi_handler(void *data, unsigned int len, void *priv)
}
#ifdef CONFIG_DEBUG_FS
-static ssize_t vpu_debug_read(struct file *file, char __user *user_buf,
- size_t count, loff_t *ppos)
+static ssize_t vpu_debug_read(struct kiocb *iocb, struct iov_iter *to)
{
char buf[256];
unsigned int len;
unsigned int running, pc, vpu_to_host, host_to_vpu, wdt, idle, ra, sp;
int ret;
- struct device *dev = file->private_data;
+ struct device *dev = iocb->ki_filp->private_data;
struct mtk_vpu *vpu = dev_get_drvdata(dev);
ret = vpu_clock_enable(vpu);
@@ -692,12 +691,12 @@ static ssize_t vpu_debug_read(struct file *file, char __user *user_buf,
len = snprintf(buf, sizeof(buf), "VPU not running\n");
}
- return simple_read_from_buffer(user_buf, count, ppos, buf, len);
+ return simple_copy_to_iter(buf, &iocb->ki_pos, len, to);
}
static const struct file_operations vpu_debug_fops = {
.open = simple_open,
- .read = vpu_debug_read,
+ .read_iter = vpu_debug_read,
};
#endif /* CONFIG_DEBUG_FS */
--
2.43.0
Powered by blists - more mailing lists