USB: use usb_endpoint_maxp() instead of le16_to_cpu()
[linux-2.6-block.git] / drivers / usb / gadget / s3c-hsotg.c
index 8bdee67ce09a55cf605169105cfab4e98b23b6ae..39b134dec94c3bd019efd17a4813b5be0f8668e0 100644 (file)
@@ -2297,7 +2297,7 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep,
                return -EINVAL;
        }
 
-       mps = le16_to_cpu(desc->wMaxPacketSize);
+       mps = usb_endpoint_maxp(desc);
 
        /* note, we handle this here instead of s3c_hsotg_set_ep_maxpacket */