From 910235b49a754fcd18157dbd22e125a32b482c9d Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sat, 12 Apr 2014 00:06:31 +0200 Subject: hwstub: fix error in config descriptor, cleanup some code Change-Id: I853340ed2c187a044726ca03ec52aed655707e27 --- utils/hwstub/stub/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'utils/hwstub/stub/main.c') diff --git a/utils/hwstub/stub/main.c b/utils/hwstub/stub/main.c index 37590e88f8..c831de0196 100644 --- a/utils/hwstub/stub/main.c +++ b/utils/hwstub/stub/main.c @@ -171,7 +171,7 @@ static void handle_std_dev_desc(struct usb_ctrlrequest *req) } else { - max_packet_size=(usb_drv_port_speed() ? 64 : 512); + max_packet_size = (usb_drv_port_speed() ? 64 : 512); config_descriptor.bDescriptorType = USB_DT_OTHER_SPEED_CONFIG; } size = sizeof(struct usb_config_descriptor); @@ -193,7 +193,6 @@ static void handle_std_dev_desc(struct usb_ctrlrequest *req) /* target specific descriptors */ target_get_config_desc(usb_buffer + size, &size); /* fix config descriptor */ - config_descriptor.bNumInterfaces = 1; config_descriptor.wTotalLength = size; memcpy(usb_buffer, (void *)&config_descriptor, sizeof(config_descriptor)); -- cgit v1.2.3