usb:udc: Remove duplicated USB definitions from include/linux/usb/ch9.h file
authorLukasz Majewski <l.majewski@samsung.com>
Wed, 2 May 2012 11:11:34 +0000 (13:11 +0200)
committerMarek Vasut <marex@denx.de>
Sun, 20 May 2012 06:32:32 +0000 (08:32 +0200)
Remove the repeated USB descriptor code and use usbdescriptors.h file.
ch9.h file has been copied from linux and is needed for USB gadget
related work.
Now usbdescriptors.h and ch9.h shall be used together.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
drivers/usb/gadget/config.c
drivers/usb/gadget/epautoconf.c
drivers/usb/gadget/ether.c
drivers/usb/gadget/s3c_udc_otg.c
drivers/usb/gadget/usbstring.c
include/linux/usb/ch9.h
include/usb/s3c_udc.h

index f9163a80ed17cbcf912f0e4baf2a9b39fc6705e5..f88d0c190c4ef9a5c0a7ac50bc4c2036e264f1d9 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/string.h>
 
 #include <linux/usb/ch9.h>
+#include <usbdescriptors.h>
 #include <linux/usb/gadget.h>
 
 
index 5b8776e0b70b4e479cdb48aebfa8dacf22b9cf97..b656c8b9f481f984dad8b291d0323a100d4d03f8 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <linux/usb/ch9.h>
+#include <usbdescriptors.h>
 #include <asm/errno.h>
 #include <linux/usb/gadget.h>
 #include <asm/unaligned.h>
index 9fb0e80ad1f3b01a13d881fd09304d346d2d10a1..f693fea1e9ba9d86fb6efee451cc16cc218d3cdb 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/errno.h>
 #include <linux/netdevice.h>
 #include <linux/usb/ch9.h>
+#include <usbdescriptors.h>
 #include <linux/usb/cdc.h>
 #include <linux/usb/gadget.h>
 #include <net.h>
index 9d11aea8e4c4baa40e4169aa8c1dab9ce8d5825f..6b922d26674004b5e8d8da7c5d443adbf5f57b7f 100644 (file)
@@ -37,6 +37,7 @@
 #include <malloc.h>
 
 #include <linux/usb/ch9.h>
+#include <usbdescriptors.h>
 #include <linux/usb/gadget.h>
 
 #include <asm/byteorder.h>
index 95555cf96b9c3a1f1b52482c54c5ae9830ae3a2a..4dbe060d6f2359c377be128e6e0a344218836a01 100644 (file)
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <asm/errno.h>
 #include <linux/usb/ch9.h>
+#include <usbdescriptors.h>
 #include <linux/usb/gadget.h>
 
 #include <asm/unaligned.h>
index 49b748337a302b2e402606f89f74c510b4e3b673..ce1d1e10ba63edaa9b5deb43078187c5aa59a9d7 100644 (file)
@@ -204,28 +204,6 @@ struct usb_descriptor_header {
        __u8  bDescriptorType;
 } __attribute__ ((packed));
 
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_DEVICE: Device descriptor */
-struct usb_device_descriptor {
-       __u8  bLength;
-       __u8  bDescriptorType;
-
-       __le16 bcdUSB;
-       __u8  bDeviceClass;
-       __u8  bDeviceSubClass;
-       __u8  bDeviceProtocol;
-       __u8  bMaxPacketSize0;
-       __le16 idVendor;
-       __le16 idProduct;
-       __le16 bcdDevice;
-       __u8  iManufacturer;
-       __u8  iProduct;
-       __u8  iSerialNumber;
-       __u8  bNumConfigurations;
-} __attribute__ ((packed));
-
 #define USB_DT_DEVICE_SIZE             18
 
 
@@ -282,56 +260,11 @@ struct usb_config_descriptor {
 #define USB_CONFIG_ATT_WAKEUP          (1 << 5)        /* can wakeup */
 #define USB_CONFIG_ATT_BATTERY         (1 << 4)        /* battery powered */
 
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_STRING: String descriptor */
-struct usb_string_descriptor {
-       __u8  bLength;
-       __u8  bDescriptorType;
-
-       __le16 wData[1];                /* UTF-16LE encoded */
-} __attribute__ ((packed));
-
 /* note that "string" zero is special, it holds language codes that
  * the device supports, not Unicode characters.
  */
 
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_INTERFACE: Interface descriptor */
-struct usb_interface_descriptor {
-       __u8  bLength;
-       __u8  bDescriptorType;
-
-       __u8  bInterfaceNumber;
-       __u8  bAlternateSetting;
-       __u8  bNumEndpoints;
-       __u8  bInterfaceClass;
-       __u8  bInterfaceSubClass;
-       __u8  bInterfaceProtocol;
-       __u8  iInterface;
-} __attribute__ ((packed));
-
 #define USB_DT_INTERFACE_SIZE          9
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_ENDPOINT: Endpoint descriptor */
-struct usb_endpoint_descriptor {
-       __u8  bLength;
-       __u8  bDescriptorType;
-
-       __u8  bEndpointAddress;
-       __u8  bmAttributes;
-       __le16 wMaxPacketSize;
-       __u8  bInterval;
-
-       /* NOTE:  these two are _only_ in audio endpoints. */
-       /* use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. */
-       __u8  bRefresh;
-       __u8  bSynchAddress;
-} __attribute__ ((packed));
-
 #define USB_DT_ENDPOINT_SIZE           7
 #define USB_DT_ENDPOINT_AUDIO_SIZE     9       /* Audio extension */
 
index 6c973b6995bb26b19a9a14a3634d71542aa9c8a5..3e6135a6bd977c4f25201840111f6ebf2f549c0c 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <asm/errno.h>
 #include <linux/usb/ch9.h>
+#include <usbdescriptors.h>
 #include <linux/usb/gadget.h>
 #include <linux/list.h>
 #include <usb/lin_gadget_compat.h>