[U-Boot] [PATCH v2 48/80] dm: usb: Move struct usb_string to a common place

Simon Glass sjg at chromium.org
Wed Mar 25 19:22:36 CET 2015


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 at chromium.org>
---

Changes in v2: None

 include/linux/usb/ch9.h    | 13 +++++++++++++
 include/linux/usb/gadget.h | 13 -------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index bd48704..10675b4 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -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 */
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 9bccd45..bd409bc 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -806,19 +806,6 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver);
 /* 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)
  * @strings:array of strings with their ids
-- 
2.2.0.rc0.207.ga3a616c



More information about the U-Boot mailing list