diff options
Diffstat (limited to 'drivers/usb/gadget/gmidi.c')
-rw-r--r-- | drivers/usb/gadget/gmidi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index 4f40f1467438..8b9220e128a7 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c @@ -695,6 +695,7 @@ static int gmidi_setup(struct usb_gadget *gadget, switch (w_value >> 8) { case USB_DT_DEVICE: + device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; value = min(w_length, (u16) sizeof(device_desc)); memcpy(req->buf, &device_desc, value); break; @@ -1249,8 +1250,6 @@ autoconf_fail: dev->req->complete = gmidi_setup_complete; - device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; - gadget->ep0->driver_data = dev; INFO(dev, "%s, version: " DRIVER_VERSION "\n", longname); |