diff options
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index e5ce4f0bb7cc..1c5e1ee7e36b 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c | |||
@@ -1392,17 +1392,17 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) | |||
1392 | spin_lock (&dev->lock); | 1392 | spin_lock (&dev->lock); |
1393 | dev->setup_abort = 0; | 1393 | dev->setup_abort = 0; |
1394 | if (dev->state == STATE_DEV_UNCONNECTED) { | 1394 | if (dev->state == STATE_DEV_UNCONNECTED) { |
1395 | |||
1396 | dev->state = STATE_DEV_CONNECTED; | ||
1397 | dev->dev->bMaxPacketSize0 = gadget->ep0->maxpacket; | ||
1398 | |||
1399 | #ifdef CONFIG_USB_GADGET_DUALSPEED | 1395 | #ifdef CONFIG_USB_GADGET_DUALSPEED |
1400 | if (gadget->speed == USB_SPEED_HIGH && dev->hs_config == 0) { | 1396 | if (gadget->speed == USB_SPEED_HIGH && dev->hs_config == 0) { |
1397 | spin_unlock(&dev->lock); | ||
1401 | ERROR (dev, "no high speed config??\n"); | 1398 | ERROR (dev, "no high speed config??\n"); |
1402 | return -EINVAL; | 1399 | return -EINVAL; |
1403 | } | 1400 | } |
1404 | #endif /* CONFIG_USB_GADGET_DUALSPEED */ | 1401 | #endif /* CONFIG_USB_GADGET_DUALSPEED */ |
1405 | 1402 | ||
1403 | dev->state = STATE_DEV_CONNECTED; | ||
1404 | dev->dev->bMaxPacketSize0 = gadget->ep0->maxpacket; | ||
1405 | |||
1406 | INFO (dev, "connected\n"); | 1406 | INFO (dev, "connected\n"); |
1407 | event = next_event (dev, GADGETFS_CONNECT); | 1407 | event = next_event (dev, GADGETFS_CONNECT); |
1408 | event->u.speed = gadget->speed; | 1408 | event->u.speed = gadget->speed; |