[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411153126.16201-204-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:15:43 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 203/437] staging: av7110: convert to read/write iterators
Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
drivers/staging/media/av7110/av7110_av.c | 6 ++++--
drivers/staging/media/av7110/av7110_ca.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/media/av7110/av7110_av.c b/drivers/staging/media/av7110/av7110_av.c
index 00dd6a7fea64..eb3ad2eae2d0 100644
--- a/drivers/staging/media/av7110/av7110_av.c
+++ b/drivers/staging/media/av7110/av7110_av.c
@@ -974,6 +974,7 @@ static ssize_t dvb_video_write(struct file *file, const char __user *buf,
else
return dvb_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 1);
}
+FOPS_WRITE_ITER_HELPER(dvb_video_write);
static __poll_t dvb_audio_poll(struct file *file, poll_table *wait)
{
@@ -1015,6 +1016,7 @@ static ssize_t dvb_audio_write(struct file *file, const char __user *buf,
else
return dvb_aplay(av7110, buf, count, file->f_flags & O_NONBLOCK, 0);
}
+FOPS_WRITE_ITER_HELPER(dvb_audio_write);
static u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00 };
@@ -1572,7 +1574,7 @@ static int dvb_audio_release(struct inode *inode, struct file *file)
static const struct file_operations dvb_video_fops = {
.owner = THIS_MODULE,
- .write = dvb_video_write,
+ .write_iter = dvb_video_write_iter,
.unlocked_ioctl = dvb_generic_ioctl,
.compat_ioctl = dvb_generic_ioctl,
.open = dvb_video_open,
@@ -1592,7 +1594,7 @@ static struct dvb_device dvbdev_video = {
static const struct file_operations dvb_audio_fops = {
.owner = THIS_MODULE,
- .write = dvb_audio_write,
+ .write_iter = dvb_audio_write_iter,
.unlocked_ioctl = dvb_generic_ioctl,
.compat_ioctl = dvb_generic_ioctl,
.open = dvb_audio_open,
diff --git a/drivers/staging/media/av7110/av7110_ca.c b/drivers/staging/media/av7110/av7110_ca.c
index c1338e074a3d..6b9c90562228 100644
--- a/drivers/staging/media/av7110/av7110_ca.c
+++ b/drivers/staging/media/av7110/av7110_ca.c
@@ -327,6 +327,7 @@ static ssize_t dvb_ca_write(struct file *file, const char __user *buf,
dprintk(8, "av7110:%p\n",av7110);
return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos);
}
+FOPS_WRITE_ITER_HELPER(dvb_ca_write);
static ssize_t dvb_ca_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
@@ -337,11 +338,12 @@ static ssize_t dvb_ca_read(struct file *file, char __user *buf,
dprintk(8, "av7110:%p\n",av7110);
return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos);
}
+FOPS_READ_ITER_HELPER(dvb_ca_read);
static const struct file_operations dvb_ca_fops = {
.owner = THIS_MODULE,
- .read = dvb_ca_read,
- .write = dvb_ca_write,
+ .read_iter = dvb_ca_read_iter,
+ .write_iter = dvb_ca_write_iter,
.unlocked_ioctl = dvb_generic_ioctl,
.open = dvb_ca_open,
.release = dvb_generic_release,
--
2.43.0
Powered by blists - more mailing lists