]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
dm: usb: Move struct usb_string to a common place
authorSimon Glass <sjg@chromium.org>
Wed, 25 Mar 2015 18:22:36 +0000 (12:22 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:47:56 +0000 (21:47 +0200)
This is needed for sandbox USB device emulation, so move it to a place
where it can be found by things other than gadgets.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
include/linux/usb/ch9.h
include/linux/usb/gadget.h

index bd48704c870daee4eb860586bade83995abd720c..10675b4d8ab575545c08dfab1c2394f4a27905ca 100644 (file)
@@ -1002,4 +1002,17 @@ struct usb_set_sel_req {
  */
 #define USB_SELF_POWER_VBUS_MAX_DRAW           100
 
+/**
+ * struct usb_string - wraps a C string and its USB id
+ * @id:the (nonzero) ID for this string
+ * @s:the string, in UTF-8 encoding
+ *
+ * If you're using usb_gadget_get_string(), use this to wrap a string
+ * together with its ID.
+ */
+struct usb_string {
+       u8 id;
+       const char *s;
+};
+
 #endif /* __LINUX_USB_CH9_H */
index 230f47d67e2d580211901cbadd186e406ec86d5c..4adf35e3ae75e7ebcd1fdc933fa4b856ed327bcf 100644 (file)
@@ -858,19 +858,6 @@ void usb_del_gadget_udc(struct usb_gadget *gadget);
 
 /* utility to simplify dealing with string descriptors */
 
-/**
- * struct usb_string - wraps a C string and its USB id
- * @id:the (nonzero) ID for this string
- * @s:the string, in UTF-8 encoding
- *
- * If you're using usb_gadget_get_string(), use this to wrap a string
- * together with its ID.
- */
-struct usb_string {
-       u8                      id;
-       const char              *s;
-};
-
 /**
  * struct usb_gadget_strings - a set of USB strings in a given language
  * @language:identifies the strings' language (0x0409 for en-us)