Value of bcdDevice has been never read from Config FS and this field was leaved uninitialized. Change usbg_parse_gadget_attrs() to read also from this file. Signed-off-by: Krzysztof Opasiak <k.opasiak@xxxxxxxxxxx> --- src/usbg.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/usbg.c b/src/usbg.c index f1671d7..3e1766e 100644 --- a/src/usbg.c +++ b/src/usbg.c @@ -903,6 +903,12 @@ static int usbg_parse_gadget_attrs(char *path, char *name, else goto out; + ret = usbg_read_hex(path, name, "bcdDevice", &buf); + if (ret == USBG_SUCCESS) + g_attrs->bcdDevice = (uint16_t) buf; + else + goto out; + ret = usbg_read_hex(path, name, "bDeviceClass", &buf); if (ret == USBG_SUCCESS) g_attrs->bDeviceClass = (uint8_t)buf; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html