aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2008-05-07 17:27:37 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-05-14 13:00:28 -0400
commitb9370332f4879360ef7126f7a19c660e87084290 (patch)
treef5538d78a167514912e84bccd3554cf6d0bf370f /drivers/usb
parent734d37c654569f03156f8603a9761c402a73aa20 (diff)
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/serial.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index 0829027d9296..fa019fa73334 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -32,7 +32,7 @@
32/* Defines */ 32/* Defines */
33 33
34#define GS_VERSION_STR "v2.2" 34#define GS_VERSION_STR "v2.2"
35#define GS_VERSION_NUM 0x0202 35#define GS_VERSION_NUM 0x2200
36 36
37#define GS_LONG_NAME "Gadget Serial" 37#define GS_LONG_NAME "Gadget Serial"
38#define GS_SHORT_NAME "g_serial" 38#define GS_SHORT_NAME "g_serial"
@@ -218,7 +218,6 @@ static char manufacturer[50];
218static struct usb_string gs_strings[] = { 218static struct usb_string gs_strings[] = {
219 { GS_MANUFACTURER_STR_ID, manufacturer }, 219 { GS_MANUFACTURER_STR_ID, manufacturer },
220 { GS_PRODUCT_STR_ID, GS_LONG_NAME }, 220 { GS_PRODUCT_STR_ID, GS_LONG_NAME },
221 { GS_SERIAL_STR_ID, "0" },
222 { GS_BULK_CONFIG_STR_ID, "Gadget Serial Bulk" }, 221 { GS_BULK_CONFIG_STR_ID, "Gadget Serial Bulk" },
223 { GS_ACM_CONFIG_STR_ID, "Gadget Serial CDC ACM" }, 222 { GS_ACM_CONFIG_STR_ID, "Gadget Serial CDC ACM" },
224 { GS_CONTROL_STR_ID, "Gadget Serial Control" }, 223 { GS_CONTROL_STR_ID, "Gadget Serial Control" },
@@ -241,7 +240,6 @@ static struct usb_device_descriptor gs_device_desc = {
241 .idProduct = __constant_cpu_to_le16(GS_PRODUCT_ID), 240 .idProduct = __constant_cpu_to_le16(GS_PRODUCT_ID),
242 .iManufacturer = GS_MANUFACTURER_STR_ID, 241 .iManufacturer = GS_MANUFACTURER_STR_ID,
243 .iProduct = GS_PRODUCT_STR_ID, 242 .iProduct = GS_PRODUCT_STR_ID,
244 .iSerialNumber = GS_SERIAL_STR_ID,
245 .bNumConfigurations = GS_NUM_CONFIGS, 243 .bNumConfigurations = GS_NUM_CONFIGS,
246}; 244};
247 245
@@ -278,7 +276,7 @@ static const struct usb_interface_descriptor gs_bulk_interface_desc = {
278 .bDescriptorType = USB_DT_INTERFACE, 276 .bDescriptorType = USB_DT_INTERFACE,
279 .bInterfaceNumber = GS_BULK_INTERFACE_ID, 277 .bInterfaceNumber = GS_BULK_INTERFACE_ID,
280 .bNumEndpoints = 2, 278 .bNumEndpoints = 2,
281 .bInterfaceClass = USB_CLASS_CDC_DATA, 279 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
282 .bInterfaceSubClass = 0, 280 .bInterfaceSubClass = 0,
283 .bInterfaceProtocol = 0, 281 .bInterfaceProtocol = 0,
284 .iInterface = GS_DATA_STR_ID, 282 .iInterface = GS_DATA_STR_ID,