]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/gadget/fsl_usb2_udc.c
usb gadget: fix platform driver hotplug/coldplug
[linux-2.6-omap-h63xx.git] / drivers / usb / gadget / fsl_usb2_udc.c
index 9bb7f64a85cdb9b0e5041f00162b3f89d0b957dd..254012ad2b91b68b344340b773b7b413374f0469 100644 (file)
@@ -776,7 +776,7 @@ fsl_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
                VDBG("%s, bad params\n", __FUNCTION__);
                return -EINVAL;
        }
-       if (!_ep || (!ep->desc && ep_index(ep))) {
+       if (unlikely(!_ep || !ep->desc)) {
                VDBG("%s, bad ep\n", __FUNCTION__);
                return -EINVAL;
        }
@@ -1318,7 +1318,7 @@ static void setup_received_irq(struct fsl_udc *udc,
                                | USB_TYPE_STANDARD)) {
                        /* Note: The driver has not include OTG support yet.
                         * This will be set when OTG support is added */
-                       if (!gadget_is_otg(udc->gadget))
+                       if (!gadget_is_otg(&udc->gadget))
                                break;
                        else if (setup->bRequest == USB_DEVICE_B_HNP_ENABLE)
                                udc->gadget.b_hnp_enable = 1;
@@ -1896,7 +1896,7 @@ static int fsl_proc_read(char *page, char **start, off_t off, int count,
 
        spin_lock_irqsave(&udc->lock, flags);
 
-       /* ------basic driver infomation ---- */
+       /* ------basic driver information ---- */
        t = scnprintf(next, size,
                        DRIVER_DESC "\n"
                        "%s version: %s\n"
@@ -2475,3 +2475,4 @@ module_exit(udc_exit);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:fsl-usb2-udc");