mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
Revert "usb: gadget: composite: fix dead lock when uvc disconnect"
This reverts commitb43b8174c1. Relpaced by commitfc9f57f643("usb: gadget: Fix spinlock lockup on usb_function_deactivate") Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
@@ -392,12 +392,8 @@ int usb_function_deactivate(struct usb_function *function)
|
||||
|
||||
spin_lock_irqsave(&cdev->lock, flags);
|
||||
|
||||
if (cdev->deactivations == 0) {
|
||||
/* drop the spinlock so the gadget disconnect can run */
|
||||
spin_unlock_irqrestore(&cdev->lock, flags);
|
||||
if (cdev->deactivations == 0)
|
||||
status = usb_gadget_deactivate(cdev->gadget);
|
||||
spin_lock_irqsave(&cdev->lock, flags);
|
||||
}
|
||||
if (status == 0)
|
||||
cdev->deactivations++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user