diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-04-20 20:24:23 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-04-20 20:24:23 +0000 |
commit | 1ab19d0b9bd94534516dfd88effe22a8f3d5aa3e (patch) | |
tree | d2e98c7f59b65dddd7fb8980ded662609ffb96f2 /firmware/usbstack | |
parent | a602c23fac50aa7116b531bc4454c587c306cd07 (diff) |
Disable usage of USB serial descriptor when no unique one is available
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20761 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usbstack')
-rw-r--r-- | firmware/usbstack/usb_core.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c index 838529b484..1e22ead63b 100644 --- a/firmware/usbstack/usb_core.c +++ b/firmware/usbstack/usb_core.c @@ -68,7 +68,7 @@ #define USB_SC_SCSI 0x06 /* Transparent */ #define USB_PROT_BULK 0x50 /* bulk only */ -static const struct usb_device_descriptor __attribute__((aligned(2))) +static struct usb_device_descriptor __attribute__((aligned(2))) device_descriptor= { .bLength = sizeof(struct usb_device_descriptor), @@ -338,16 +338,9 @@ static void set_serial_descriptor(void) usb_string_iSerial.bLength=68; } #else -#warning No proper set_serial_descriptor() implementation for this target static void set_serial_descriptor(void) { - short* p = &usb_string_iSerial.wString[1]; - int i; - for (i = 0; i < 16; i++) { - *p++ = hex[(2*i)&0xF]; - *p++ = hex[(2*i+1)&0xF]; - } - usb_string_iSerial.bLength=68; + device_descriptor.iSerialNumber = 0; } #endif |