usb: gadget: composite: remove redundant bcdUSB setting in legacy
authorIgor Kotrasinski <i.kotrasinsk@samsung.com>
Tue, 20 Oct 2015 16:33:13 +0000 (18:33 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 15 Dec 2015 15:12:41 +0000 (09:12 -0600)
Since composite now overwrites bcdUSB for any gadget, remove
setting it in legacy gadgets. All legacy gadgets set 0x0200, the
same as the value additionally set by composite, so there is no
behaviour change.

Signed-off-by: Igor Kotrasinski <i.kotrasinsk@samsung.com>
Rebase onto current balbi/next

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
16 files changed:
drivers/usb/gadget/legacy/acm_ms.c
drivers/usb/gadget/legacy/audio.c
drivers/usb/gadget/legacy/cdc2.c
drivers/usb/gadget/legacy/ether.c
drivers/usb/gadget/legacy/g_ffs.c
drivers/usb/gadget/legacy/gmidi.c
drivers/usb/gadget/legacy/hid.c
drivers/usb/gadget/legacy/mass_storage.c
drivers/usb/gadget/legacy/multi.c
drivers/usb/gadget/legacy/ncm.c
drivers/usb/gadget/legacy/nokia.c
drivers/usb/gadget/legacy/printer.c
drivers/usb/gadget/legacy/serial.c
drivers/usb/gadget/legacy/tcm_usb_gadget.c
drivers/usb/gadget/legacy/webcam.c
drivers/usb/gadget/legacy/zero.c

index 4b158e2d1e57b829b19c8eb30c3cf8cadb6d32c4..c16089efc3224124c3960e45e13819e17406c267 100644 (file)
@@ -40,7 +40,7 @@ static struct usb_device_descriptor device_desc = {
        .bLength =              sizeof device_desc,
        .bDescriptorType =      USB_DT_DEVICE,
 
-       .bcdUSB =               cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
 
        .bDeviceClass =         USB_CLASS_MISC /* 0xEF */,
        .bDeviceSubClass =      2,
index 685cf3b4b78f8b47c3ea110bafc7637ec043c8d0..5d7b3c6a422ba8807944639828ecc1f2097e4a23 100644 (file)
@@ -123,7 +123,7 @@ static struct usb_device_descriptor device_desc = {
        .bLength =              sizeof device_desc,
        .bDescriptorType =      USB_DT_DEVICE,
 
-       .bcdUSB =               cpu_to_le16(0x200),
+       /* .bcdUSB = DYNAMIC */
 
 #ifdef CONFIG_GADGET_UAC1
        .bDeviceClass =         USB_CLASS_PER_INTERFACE,
index ecd8c8d62f2e9334062f68dce67a071765cdab7d..51c08682de846a1dbb264dad9aa5bfeaba99a759 100644 (file)
@@ -43,7 +43,7 @@ static struct usb_device_descriptor device_desc = {
        .bLength =              sizeof device_desc,
        .bDescriptorType =      USB_DT_DEVICE,
 
-       .bcdUSB =               cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
 
        .bDeviceClass =         USB_CLASS_COMM,
        .bDeviceSubClass =      0,
index 31e9160223e9aa772669ad4128f27729e6decef5..25a2c2e4859202d68825e9571fcc263d9fee3920 100644 (file)
@@ -151,7 +151,7 @@ static struct usb_device_descriptor device_desc = {
        .bLength =              sizeof device_desc,
        .bDescriptorType =      USB_DT_DEVICE,
 
-       .bcdUSB =               cpu_to_le16 (0x0200),
+       /* .bcdUSB = DYNAMIC */
 
        .bDeviceClass =         USB_CLASS_COMM,
        .bDeviceSubClass =      0,
index 320a81b2baa688cb4bc9db1eaad1ca7435bfca23..f85639ef8a8f66e49b9dbaff3a530fea4be3d9cc 100644 (file)
@@ -69,7 +69,7 @@ static struct usb_device_descriptor gfs_dev_desc = {
        .bLength                = sizeof gfs_dev_desc,
        .bDescriptorType        = USB_DT_DEVICE,
 
-       .bcdUSB                 = cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
        .bDeviceClass           = USB_CLASS_PER_INTERFACE,
 
        .idVendor               = cpu_to_le16(GFS_VENDOR_ID),
index be8e91d68e146bb4d3eae678028f974471a3e82b..e27aad5e50b9af9b392a4e4fa2324fe91683dfa4 100644 (file)
@@ -78,7 +78,7 @@ MODULE_PARM_DESC(out_ports, "Number of MIDI output ports");
 static struct usb_device_descriptor device_desc = {
        .bLength =              USB_DT_DEVICE_SIZE,
        .bDescriptorType =      USB_DT_DEVICE,
-       .bcdUSB =               cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
        .bDeviceClass =         USB_CLASS_PER_INTERFACE,
        .idVendor =             cpu_to_le16(DRIVER_VENDOR_NUM),
        .idProduct =            cpu_to_le16(DRIVER_PRODUCT_NUM),
index 7e5d2c48476e568021fa5c550040c999c3cfa7b0..a71a884f79fc7c87efd214322ecf745c7a69903a 100644 (file)
@@ -47,7 +47,7 @@ static struct usb_device_descriptor device_desc = {
        .bLength =              sizeof device_desc,
        .bDescriptorType =      USB_DT_DEVICE,
 
-       .bcdUSB =               cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
 
        /* .bDeviceClass =              USB_CLASS_COMM, */
        /* .bDeviceSubClass =   0, */
index bda3c519110fe266dec569c4e85159499fa062d1..e61af53c7d2b3d8512b7c6ac588a7f64af81a1ab 100644 (file)
@@ -55,7 +55,7 @@ static struct usb_device_descriptor msg_device_desc = {
        .bLength =              sizeof msg_device_desc,
        .bDescriptorType =      USB_DT_DEVICE,
 
-       .bcdUSB =               cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
        .bDeviceClass =         USB_CLASS_PER_INTERFACE,
 
        /* Vendor and product id can be overridden by module parameters.  */
index 4fe794ddcd49ced2c4206c730b251be8a008352f..229d704a620b38ba8adb53bbdab15a6642e04954 100644 (file)
@@ -67,7 +67,7 @@ static struct usb_device_descriptor device_desc = {
        .bLength =              sizeof device_desc,
        .bDescriptorType =      USB_DT_DEVICE,
 
-       .bcdUSB =               cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
 
        .bDeviceClass =         USB_CLASS_MISC /* 0xEF */,
        .bDeviceSubClass =      2,
index 2bae4381332d57203f95713f03e8a1f7aba9c35d..0aba68253e3d61d544b6180baec6c0b0b7b1336f 100644 (file)
@@ -49,7 +49,7 @@ static struct usb_device_descriptor device_desc = {
        .bLength =              sizeof device_desc,
        .bDescriptorType =      USB_DT_DEVICE,
 
-       .bcdUSB =               cpu_to_le16 (0x0200),
+       /* .bcdUSB = DYNAMIC */
 
        .bDeviceClass =         USB_CLASS_COMM,
        .bDeviceSubClass =      0,
index 8b3f6fb1825d56a7266eeb5c09ce115e60f26be8..09975046c6941fbce241ce671d299281fefc88fe 100644 (file)
@@ -89,7 +89,7 @@ static struct usb_gadget_strings *dev_strings[] = {
 static struct usb_device_descriptor device_desc = {
        .bLength                = USB_DT_DEVICE_SIZE,
        .bDescriptorType        = USB_DT_DEVICE,
-       .bcdUSB                 = cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
        .bDeviceClass           = USB_CLASS_COMM,
        .idVendor               = cpu_to_le16(NOKIA_VENDOR_ID),
        .idProduct              = cpu_to_le16(NOKIA_PRODUCT_ID),
index a22d30a4def1e0406512608d22aec7eaefd67561..6f969a86175c31a69cdf01b49b8bba8b6169b8f3 100644 (file)
@@ -71,7 +71,7 @@ static struct usb_function *f_printer;
 static struct usb_device_descriptor device_desc = {
        .bLength =              sizeof device_desc,
        .bDescriptorType =      USB_DT_DEVICE,
-       .bcdUSB =               cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
        .bDeviceClass =         USB_CLASS_PER_INTERFACE,
        .bDeviceSubClass =      0,
        .bDeviceProtocol =      0,
index c5d42e0347a94cbd190c7162626ec9177f130662..9d89adce756d1a708dfffca03824fb465cb219e0 100644 (file)
@@ -65,7 +65,7 @@ static struct usb_gadget_strings *dev_strings[] = {
 static struct usb_device_descriptor device_desc = {
        .bLength =              USB_DT_DEVICE_SIZE,
        .bDescriptorType =      USB_DT_DEVICE,
-       .bcdUSB =               cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
        /* .bDeviceClass = f(use_acm) */
        .bDeviceSubClass =      0,
        .bDeviceProtocol =      0,
index 22e56158d5850236242375d036f70250b676dac7..7857fa411636be096986c64c73695e17059110a6 100644 (file)
@@ -1974,7 +1974,7 @@ static struct usb_descriptor_header *uasp_ss_function_desc[] = {
 static struct usb_device_descriptor usbg_device_desc = {
        .bLength =              sizeof(usbg_device_desc),
        .bDescriptorType =      USB_DT_DEVICE,
-       .bcdUSB =               cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
        .bDeviceClass =         USB_CLASS_PER_INTERFACE,
        .idVendor =             cpu_to_le16(UAS_VENDOR_ID),
        .idProduct =            cpu_to_le16(UAS_PRODUCT_ID),
index 72c976bf3530f595115a9536267069c50e13aeba..f9661cd627c8e7712c0ca251a1b670eba1528cf5 100644 (file)
@@ -77,7 +77,7 @@ static struct usb_function *f_uvc;
 static struct usb_device_descriptor webcam_device_descriptor = {
        .bLength                = USB_DT_DEVICE_SIZE,
        .bDescriptorType        = USB_DT_DEVICE,
-       .bcdUSB                 = cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
        .bDeviceClass           = USB_CLASS_MISC,
        .bDeviceSubClass        = 0x02,
        .bDeviceProtocol        = 0x01,
index 0ccdcd9c64a5959dffbc41894b1b776d1748f6d7..d02e2ce73ea5fd58a14ed798595a3a8181f79c98 100644 (file)
@@ -115,7 +115,7 @@ static struct usb_device_descriptor device_desc = {
        .bLength =              sizeof device_desc,
        .bDescriptorType =      USB_DT_DEVICE,
 
-       .bcdUSB =               cpu_to_le16(0x0200),
+       /* .bcdUSB = DYNAMIC */
        .bDeviceClass =         USB_CLASS_VENDOR_SPEC,
 
        .idVendor =             cpu_to_le16(DRIVER_VENDOR_NUM),