[PATCH 421/437] media: dbbridge: convert to read/write iterators

Jens Axboe
2024-04-11T15:43:25Z

drivers/media/pci/ddbridge/ddbridge-core.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c
index 40e6c873c36d..118f22cced88 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -731,6 +731,7 @@ static ssize_t ts_write(struct file *file, const __user char *buf,
}
return (left == count) ? -EAGAIN : (count - left);
}
+FOPS_WRITE_ITER_HELPER(ts_write);

static ssize_t ts_read(struct file *file, __user char *buf,
size_t count, loff_t *ppos)
@@ -761,6 +762,7 @@ static ssize_t ts_read(struct file *file, __user char *buf,
}
return (count && (left == count)) ? -EAGAIN : (count - left);
}
+FOPS_READ_ITER_HELPER(ts_read);

static __poll_t ts_poll(struct file *file, poll_table *wait)
{
@@ -838,8 +840,8 @@ static int ts_open(struct inode *inode, struct file *file)

static const struct file_operations ci_fops = {
.owner = THIS_MODULE,
- .read = ts_read,
- .write = ts_write,
+ .read_iter = ts_read_iter,
+ .write_iter = ts_write_iter,
.open = ts_open,
.release = ts_release,
.poll = ts_poll,
--
2.43.0