summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/imx_udc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/imx_udc.c')
-rw-r--r--drivers/usb/gadget/imx_udc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c
index 692fd9b2248b..bf08bfcd90b8 100644
--- a/drivers/usb/gadget/imx_udc.c
+++ b/drivers/usb/gadget/imx_udc.c
@@ -689,7 +689,7 @@ static int imx_ep_enable(struct usb_ep *usb_ep,
return -EINVAL;
}
- if (imx_ep->fifosize < le16_to_cpu(desc->wMaxPacketSize)) {
+ if (imx_ep->fifosize < usb_endpoint_maxp(desc)) {
D_ERR(imx_usb->dev,
"<%s> bad %s maxpacket\n", __func__, usb_ep->name);
return -ERANGE;
OpenPOWER on IntegriCloud