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 4b158e2..c16089e 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 685cf3b..5d7b3c6 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 ecd8c8d..51c0868 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 31e9160..25a2c2e 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 320a81b..f85639e 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 be8e91d..e27aad5 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 7e5d2c4..a71a884 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 bda3c51..e61af53 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 4fe794d..229d704 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 2bae438..0aba682 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 8b3f6fb..0997504 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 a22d30a..6f969a8 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 c5d42e0..9d89adc 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 22e5615..7857fa4 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 72c976b..f9661cd 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 0ccdcd9..d02e2ce 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),