summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2012-08-23 10:49:12 +0800
committerPeter Chen <peter.chen@freescale.com>2012-08-23 10:58:30 +0800
commit76ff4e14a63bf7982e2301e61bea41fb7a9aea2d (patch)
treea4a6dafbbe53eddc753817a97ee17197def97a1f
parentd25abd9d9818575d9bdef3c6056ba384dfab54a6 (diff)
ENGR00221164 usb: device: fix calling mutex at atomic environment
Move spin_unlock_irqrestore to avoid calling mutex at atomic environment, as dr_wake_up_enable will call mutex_lock Signed-off-by: Peter Chen <peter.chen@freescale.com>
-rwxr-xr-xdrivers/usb/gadget/arcotg_udc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/arcotg_udc.c b/drivers/usb/gadget/arcotg_udc.c
index bab3ec92a6b7..b6b6190b4da1 100755
--- a/drivers/usb/gadget/arcotg_udc.c
+++ b/drivers/usb/gadget/arcotg_udc.c
@@ -2206,9 +2206,9 @@ static void fsl_gadget_disconnect_event(struct work_struct *work)
fsl_writel(tmp | (OTGSC_B_SESSION_VALID_IRQ_EN),
&dr_regs->otgsc);
udc->stopped = 1;
+ spin_unlock_irqrestore(&udc->lock, flags);
/* enable wake up */
dr_wake_up_enable(udc, true);
- spin_unlock_irqrestore(&udc->lock, flags);
/* close USB PHY clock */
dr_phy_low_power_mode(udc, true);
/* close dr controller clock */