diff options
author | Will Newton <will.newton@imgtec.com> | 2008-08-12 10:39:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 17:41:06 -0400 |
commit | e06da9a828aa1ef52d1338b7a3d07291a04d581e (patch) | |
tree | 95c68cea76a1ad559744167d4eb2ee1a2faf6e85 | |
parent | 9d9d88c80e80397a71745ab80e69edd95e1f6b41 (diff) |
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 <will.newton@gmail.com>
Acked-by: Li Yang <leoli@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/gadget/fsl_usb2_udc.c | 4 |
1 files changed, 3 insertions, 1 deletions
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, | |||
2190 | udc->usb_state = USB_STATE_POWERED; | 2190 | udc->usb_state = USB_STATE_POWERED; |
2191 | udc->ep0_dir = 0; | 2191 | udc->ep0_dir = 0; |
2192 | udc->remote_wakeup = 0; /* default to 0 on reset */ | 2192 | udc->remote_wakeup = 0; /* default to 0 on reset */ |
2193 | spin_lock_init(&udc->lock); | ||
2194 | 2193 | ||
2195 | return 0; | 2194 | return 0; |
2196 | } | 2195 | } |
@@ -2252,6 +2251,9 @@ static int __init fsl_udc_probe(struct platform_device *pdev) | |||
2252 | return -ENOMEM; | 2251 | return -ENOMEM; |
2253 | } | 2252 | } |
2254 | 2253 | ||
2254 | spin_lock_init(&udc_controller->lock); | ||
2255 | udc_controller->stopped = 1; | ||
2256 | |||
2255 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 2257 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
2256 | if (!res) { | 2258 | if (!res) { |
2257 | kfree(udc_controller); | 2259 | kfree(udc_controller); |