diff options
author | Stefan Brüns | 2015-12-22 01:18:13 +0100 |
---|---|---|
committer | Marek Vasut | 2015-12-31 10:05:31 +0100 |
commit | c75f57fba4712fed1b0f7b9b10c2bbfdb9ede449 (patch) | |
tree | 0266dc3aca10dca86b9881543edc738718105963 /include/usb.h | |
parent | 78680314c53a95c0bb25e942662979843b60d7b9 (diff) |
usb: Alloc buffer for USB descriptor dynamically
The configuration descriptor includes all interface, endpoint and
auxiliary descriptors (e.g. report, union) so 512 bytes may not be enough.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/usb.h')
-rw-r--r-- | include/usb.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/usb.h b/include/usb.h index 55b9268ea16..198ecbcbe32 100644 --- a/include/usb.h +++ b/include/usb.h @@ -266,8 +266,9 @@ int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer, int transfer_len, int interval); int usb_disable_asynch(int disable); int usb_maxpacket(struct usb_device *dev, unsigned long pipe); -int usb_get_configuration_no(struct usb_device *dev, unsigned char *buffer, - int cfgno); +int usb_get_configuration_no(struct usb_device *dev, int cfgno, + unsigned char *buffer, int length); +int usb_get_configuration_len(struct usb_device *dev, int cfgno); int usb_get_report(struct usb_device *dev, int ifnum, unsigned char type, unsigned char id, void *buf, int size); int usb_get_class_descriptor(struct usb_device *dev, int ifnum, |