From: Will Newton Date: Tue, 12 Aug 2008 14:39:12 +0000 (+0100) Subject: fsl_usb2_udc: Initialize spinlock earlier. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e06da9a828aa1ef52d1338b7a3d07291a04d581e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git fsl_usb2_udc: Initialize spinlock earlier. Move spinlock initialization earlier so we can turn shared irq handler debugging on safely. Signed-off-by: Will Newton Acked-by: Li Yang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c index 2bd2c9341f6d..7b8cdaec260b 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.c +++ b/drivers/usb/gadget/fsl_usb2_udc.c @@ -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);