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