usb: gadget: add "usb_validate_langid" function
The USB LANGID validation code in "check_user_usb_string" function is moved to "usb_validate_langid" function which can be used by other usb gadget drivers. Signed-off-by: Tao Ren <rentao.bupt@gmail.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
This commit is contained in:
@@ -773,6 +773,9 @@ struct usb_gadget_string_container {
|
||||
/* put descriptor for string with that id into buf (buflen >= 256) */
|
||||
int usb_gadget_get_string(const struct usb_gadget_strings *table, int id, u8 *buf);
|
||||
|
||||
/* check if the given language identifier is valid */
|
||||
bool usb_validate_langid(u16 langid);
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/* utility to simplify managing config descriptors */
|
||||
|
Reference in New Issue
Block a user