USB: use usb_endpoint_maxp() instead of le16_to_cpu()
[linux-2.6-block.git] / drivers / usb / gadget / s3c2410_udc.c
index 85c1b0d66293c72fe1577ea506faeb1b7cfb1d41..2572854486781665ee12c485f46c5b0d00ee65de 100644 (file)
@@ -1082,7 +1082,7 @@ static int s3c2410_udc_ep_enable(struct usb_ep *_ep,
        if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
                return -ESHUTDOWN;
 
-       max = le16_to_cpu(desc->wMaxPacketSize) & 0x1fff;
+       max = usb_endpoint_maxp(desc) & 0x1fff;
 
        local_irq_save (flags);
        _ep->maxpacket = max & 0x7ff;
@@ -2060,6 +2060,7 @@ static int s3c2410_udc_resume(struct platform_device *pdev)
 static const struct platform_device_id s3c_udc_ids[] = {
        { "s3c2410-usbgadget", },
        { "s3c2440-usbgadget", },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, s3c_udc_ids);