]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/gadget/fsl_usb2_udc.c
fsl_usb2_udc: Initialize spinlock earlier.
[linux-2.6-omap-h63xx.git] / drivers / usb / gadget / fsl_usb2_udc.c
index 2bd2c9341f6deac213a4c312153cd3300ee95ed8..7b8cdaec260b33135cf3c194311a49af75d16f46 100644 (file)
@@ -2190,7 +2190,6 @@ static int __init struct_udc_setup(struct fsl_udc *udc,
        udc->usb_state = USB_STATE_POWERED;
        udc->ep0_dir = 0;
        udc->remote_wakeup = 0; /* default to 0 on reset */
-       spin_lock_init(&udc->lock);
 
        return 0;
 }
@@ -2252,6 +2251,9 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
+       spin_lock_init(&udc_controller->lock);
+       udc_controller->stopped = 1;
+
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!res) {
                kfree(udc_controller);