struct usb_descriptor_header *head;
int index, ifno, epno, curr_if_num;
int i;
- unsigned char *ch;
ifno = -1;
epno = -1;
head->bDescriptorType);
{
- ch = (unsigned char *)head;
+#ifdef USB_DEBUG
+ unsigned char *ch = (unsigned char *)head;
+#endif
for (i = 0; i < head->bLength; i++)
USB_PRINTF("%02X ", *ch++);
USB_PRINTF("\n\n\n");
{
struct usb_device *usb;
struct usb_port_status portsts;
- unsigned short portstatus, portchange;
+ unsigned short portstatus;
/* Check status */
if (usb_get_port_status(dev, port + 1, &portsts) < 0) {
}
portstatus = le16_to_cpu(portsts.wPortStatus);
- portchange = le16_to_cpu(portsts.wPortChange);
USB_HUB_PRINTF("portstatus %x, change %x, %s\n",
- portstatus, portchange, portspeed(portstatus));
+ portstatus,
+ le16_to_cpu(portsts.wPortChange),
+ portspeed(portstatus));
/* Clear the connection change status */
usb_clear_port_feature(dev, port + 1, USB_PORT_FEAT_C_CONNECTION);
int usb_hub_configure(struct usb_device *dev)
{
+ int i;
unsigned char buffer[USB_BUFSIZ], *bitmap;
struct usb_hub_descriptor *descriptor;
- struct usb_hub_status *hubsts;
- int i;
struct usb_hub_device *hub;
+#ifdef USB_HUB_DEBUG
+ struct usb_hub_status *hubsts;
+#endif
/* "allocate" Hub device */
hub = usb_hub_allocate();
return -1;
}
+#ifdef USB_HUB_DEBUG
hubsts = (struct usb_hub_status *)buffer;
+#endif
USB_HUB_PRINTF("get_hub_status returned status %X, change %X\n",
le16_to_cpu(hubsts->wHubStatus),
le16_to_cpu(hubsts->wHubChange));