summaryrefslogtreecommitdiff
path: root/include/usb.h
diff options
context:
space:
mode:
authorSergey Temerkhanov <s.temerkhanov@gmail.com>2015-04-01 17:18:44 +0300
committerMarek Vasut <marex@denx.de>2015-04-14 05:47:48 +0200
commitb12242aceb9f76278da8736b07c88eb07cfd20d0 (patch)
tree083a9716139a72cbf58e443575977573eb2c8c12 /include/usb.h
parentec5e78cf8ac3a1bbf692698112ae15982d2bbf1b (diff)
usb: Convert protocol header structures to use explicitly sized variables
This patch converts USB protocol headers to use explicitly sized fields like the rest of the code Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com> Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Diffstat (limited to 'include/usb.h')
-rw-r--r--include/usb.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/usb.h b/include/usb.h
index a8fee0bdb76..2c3d5063455 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -45,20 +45,20 @@
/* device request (setup) */
struct devrequest {
- unsigned char requesttype;
- unsigned char request;
- unsigned short value;
- unsigned short index;
- unsigned short length;
+ __u8 requesttype;
+ __u8 request;
+ __le16 value;
+ __le16 index;
+ __le16 length;
} __attribute__ ((packed));
/* Interface */
struct usb_interface {
struct usb_interface_descriptor desc;
- unsigned char no_of_ep;
- unsigned char num_altsetting;
- unsigned char act_altsetting;
+ __u8 no_of_ep;
+ __u8 num_altsetting;
+ __u8 act_altsetting;
struct usb_endpoint_descriptor ep_desc[USB_MAXENDPOINTS];
/*
@@ -73,7 +73,7 @@ struct usb_interface {
struct usb_config {
struct usb_config_descriptor desc;
- unsigned char no_of_if; /* number of interfaces */
+ __u8 no_of_if; /* number of interfaces */
struct usb_interface if_desc[USB_MAXINTERFACES];
} __attribute__ ((packed));