usb: gadget: add "maxpacket_limit" field to struct usb_ep
[firefly-linux-kernel-4.4.55.git] / drivers / usb / chipidea / udc.c
index b34c81969cba672a7e880f405f2445adf36b7e6f..77e4a17cfb44c04af442b7c83c9f7941ae1b54a2 100644 (file)
@@ -1566,7 +1566,7 @@ static int init_eps(struct ci_hdrc *ci)
                         * eps, maxP is set by epautoconfig() called
                         * by gadget layer
                         */
-                       hwep->ep.maxpacket = (unsigned short)~0;
+                       usb_ep_set_maxpacket_limit(&hwep->ep, (unsigned short)~0);
 
                        INIT_LIST_HEAD(&hwep->qh.queue);
                        hwep->qh.ptr = dma_pool_alloc(ci->qh_pool, GFP_KERNEL,
@@ -1586,7 +1586,7 @@ static int init_eps(struct ci_hdrc *ci)
                                else
                                        ci->ep0in = hwep;
 
-                               hwep->ep.maxpacket = CTRL_PAYLOAD_MAX;
+                               usb_ep_set_maxpacket_limit(&hwep->ep, CTRL_PAYLOAD_MAX);
                                continue;
                        }