diff options
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/gadget.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index cf468fbdbf8e..0ebedaec075d 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -858,6 +858,25 @@ int usb_descriptor_fillbuf(void *, unsigned, | |||
858 | int usb_gadget_config_buf(const struct usb_config_descriptor *config, | 858 | int usb_gadget_config_buf(const struct usb_config_descriptor *config, |
859 | void *buf, unsigned buflen, const struct usb_descriptor_header **desc); | 859 | void *buf, unsigned buflen, const struct usb_descriptor_header **desc); |
860 | 860 | ||
861 | /* copy a NULL-terminated vector of descriptors */ | ||
862 | struct usb_descriptor_header **usb_copy_descriptors( | ||
863 | struct usb_descriptor_header **); | ||
864 | |||
865 | /* return copy of endpoint descriptor given original descriptor set */ | ||
866 | struct usb_endpoint_descriptor *usb_find_endpoint( | ||
867 | struct usb_descriptor_header **src, | ||
868 | struct usb_descriptor_header **copy, | ||
869 | struct usb_endpoint_descriptor *match); | ||
870 | |||
871 | /** | ||
872 | * usb_free_descriptors - free descriptors returned by usb_copy_descriptors() | ||
873 | * @v: vector of descriptors | ||
874 | */ | ||
875 | static inline void usb_free_descriptors(struct usb_descriptor_header **v) | ||
876 | { | ||
877 | kfree(v); | ||
878 | } | ||
879 | |||
861 | /*-------------------------------------------------------------------------*/ | 880 | /*-------------------------------------------------------------------------*/ |
862 | 881 | ||
863 | /* utility wrapping a simple endpoint selection policy */ | 882 | /* utility wrapping a simple endpoint selection policy */ |