USB: serial gadget: descriptor cleanup

Bugfix some serial gadget descriptors:

- Stop mangling the low bits (controller type ID) of bcdDevice;
just use the high bits for a driver revision code.

- Serial numbers that aren't specific to individual devices
are useless; stop reporting "0" for this.

- Since it's not part of a CDC-conformant function, the "bulk only"
configuration shouldn't be using "CDC Data" as its interface class.
Switch over to using CLASS_VENDOR_SPEC (different value, 0xff).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by David Brownell and committed by Greg Kroah-Hartman b9370332 734d37c6

+2 -4
+2 -4
drivers/usb/gadget/serial.c
··· 32 /* Defines */ 33 34 #define GS_VERSION_STR "v2.2" 35 - #define GS_VERSION_NUM 0x0202 36 37 #define GS_LONG_NAME "Gadget Serial" 38 #define GS_SHORT_NAME "g_serial" ··· 218 static struct usb_string gs_strings[] = { 219 { GS_MANUFACTURER_STR_ID, manufacturer }, 220 { GS_PRODUCT_STR_ID, GS_LONG_NAME }, 221 - { GS_SERIAL_STR_ID, "0" }, 222 { GS_BULK_CONFIG_STR_ID, "Gadget Serial Bulk" }, 223 { GS_ACM_CONFIG_STR_ID, "Gadget Serial CDC ACM" }, 224 { GS_CONTROL_STR_ID, "Gadget Serial Control" }, ··· 240 .idProduct = __constant_cpu_to_le16(GS_PRODUCT_ID), 241 .iManufacturer = GS_MANUFACTURER_STR_ID, 242 .iProduct = GS_PRODUCT_STR_ID, 243 - .iSerialNumber = GS_SERIAL_STR_ID, 244 .bNumConfigurations = GS_NUM_CONFIGS, 245 }; 246 ··· 276 .bDescriptorType = USB_DT_INTERFACE, 277 .bInterfaceNumber = GS_BULK_INTERFACE_ID, 278 .bNumEndpoints = 2, 279 - .bInterfaceClass = USB_CLASS_CDC_DATA, 280 .bInterfaceSubClass = 0, 281 .bInterfaceProtocol = 0, 282 .iInterface = GS_DATA_STR_ID,
··· 32 /* Defines */ 33 34 #define GS_VERSION_STR "v2.2" 35 + #define GS_VERSION_NUM 0x2200 36 37 #define GS_LONG_NAME "Gadget Serial" 38 #define GS_SHORT_NAME "g_serial" ··· 218 static struct usb_string gs_strings[] = { 219 { GS_MANUFACTURER_STR_ID, manufacturer }, 220 { GS_PRODUCT_STR_ID, GS_LONG_NAME }, 221 { GS_BULK_CONFIG_STR_ID, "Gadget Serial Bulk" }, 222 { GS_ACM_CONFIG_STR_ID, "Gadget Serial CDC ACM" }, 223 { GS_CONTROL_STR_ID, "Gadget Serial Control" }, ··· 241 .idProduct = __constant_cpu_to_le16(GS_PRODUCT_ID), 242 .iManufacturer = GS_MANUFACTURER_STR_ID, 243 .iProduct = GS_PRODUCT_STR_ID, 244 .bNumConfigurations = GS_NUM_CONFIGS, 245 }; 246 ··· 278 .bDescriptorType = USB_DT_INTERFACE, 279 .bInterfaceNumber = GS_BULK_INTERFACE_ID, 280 .bNumEndpoints = 2, 281 + .bInterfaceClass = USB_CLASS_VENDOR_SPEC, 282 .bInterfaceSubClass = 0, 283 .bInterfaceProtocol = 0, 284 .iInterface = GS_DATA_STR_ID,