Commit 76ff4e14 authored by Peter Chen's avatar Peter Chen

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: default avatarPeter Chen <>
parent d25abd9d
......@@ -2206,9 +2206,9 @@ static void fsl_gadget_disconnect_event(struct work_struct *work)
fsl_writel(tmp | (OTGSC_B_SESSION_VALID_IRQ_EN),
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 */
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment