diff options
author | Oliver Neukum <oneukum@suse.com> | 2020-09-23 15:43:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-25 16:33:58 +0200 |
commit | ddd1198e3e0935066d6e309180d49f64ef4fa702 (patch) | |
tree | 73bc74b933f1fa6e0f3705e66b056950d0217c4c /include/linux/usb.h | |
parent | cf58e8e75229cb80b2b46afc98dc5ed53cd65ddf (diff) |
USB: correct API of usb_control_msg_send/recv
They need to specify how memory is to be allocated,
as control messages need to work in contexts that require GFP_NOIO.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20200923134348.23862-9-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index a5460f08126e..7d72c4e0713c 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1804,10 +1804,12 @@ extern int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, /* wrappers around usb_control_msg() for the most common standard requests */ int usb_control_msg_send(struct usb_device *dev, __u8 endpoint, __u8 request, __u8 requesttype, __u16 value, __u16 index, - const void *data, __u16 size, int timeout); + const void *data, __u16 size, int timeout, + gfp_t memflags); int usb_control_msg_recv(struct usb_device *dev, __u8 endpoint, __u8 request, __u8 requesttype, __u16 value, __u16 index, - void *data, __u16 size, int timeout); + void *data, __u16 size, int timeout, + gfp_t memflags); extern int usb_get_descriptor(struct usb_device *dev, unsigned char desctype, unsigned char descindex, void *buf, int size); extern int usb_get_status(struct usb_device *dev, |