diff mbox

[U-Boot,v2,72/80] dm: usb: Add a generic descriptor struct

Message ID 1427307788-7496-73-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass March 25, 2015, 6:23 p.m. UTC
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>
---

Changes in v2: None

 include/linux/usb/ch9.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Simon Glass April 7, 2015, 7:11 p.m. UTC | #1
On 25 March 2015 at 12:23, Simon Glass <sjg@chromium.org> wrote:
> 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>
> ---
>
> Changes in v2: None
>
>  include/linux/usb/ch9.h | 5 +++++
>  1 file changed, 5 insertions(+)

Applied to u-boot-dm/next.
diff mbox

Patch

diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index 10675b4..822fca0 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