From: Simon Glass <sjg@chromium.org>
Date: Wed, 25 Mar 2015 18:23:00 +0000 (-0600)
Subject: dm: usb: Add a generic descriptor struct
X-Git-Tag: v2025.01-rc5-pxa1908~13237
X-Git-Url: http://git.dujemihanovic.xyz/html/static/gitweb.css?a=commitdiff_plain;h=8e2b6619c58cbf3b797d13548fceb5d9d4c34ac3;p=u-boot.git

dm: usb: Add a generic descriptor struct

This is useful for creating lists of descriptors, and is better than using
void * for this purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
---

diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index 10675b4d8a..822fca0357 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -379,6 +379,11 @@ struct usb_endpoint_descriptor {
 #define USB_DT_ENDPOINT_SIZE		7
 #define USB_DT_ENDPOINT_AUDIO_SIZE	9	/* Audio extension */
 
+/* Used to access common fields */
+struct usb_generic_descriptor {
+	__u8  bLength;
+	__u8  bDescriptorType;
+};
 
 /*
  * Endpoints