[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411153126.16201-159-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:14:58 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 158/437] usb: core: convert to read/write iterators
Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
drivers/usb/core/devices.c | 3 ++-
drivers/usb/core/devio.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index a247da73f34d..f367132a6770 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -538,8 +538,9 @@ static ssize_t usb_device_read(struct file *file, char __user *buf,
mutex_unlock(&usb_bus_idr_lock);
return total_written;
}
+FOPS_READ_ITER_HELPER(usb_device_read);
const struct file_operations usbfs_devices_fops = {
.llseek = no_seek_end_llseek,
- .read = usb_device_read,
+ .read_iter = usb_device_read_iter,
};
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 3beb6a862e80..bebfbebc1f69 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -390,6 +390,7 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes,
usb_unlock_device(dev);
return ret;
}
+FOPS_READ_ITER_HELPER(usbdev_read);
/*
* async list handling
@@ -2846,7 +2847,7 @@ static __poll_t usbdev_poll(struct file *file,
const struct file_operations usbdev_file_operations = {
.owner = THIS_MODULE,
.llseek = no_seek_end_llseek,
- .read = usbdev_read,
+ .read_iter = usbdev_read_iter,
.poll = usbdev_poll,
.unlocked_ioctl = usbdev_ioctl,
.compat_ioctl = compat_ptr_ioctl,
--
2.43.0
Powered by blists - more mailing lists