Revert "usb: gadget: composite: fix dead lock when uvc disconnect"

This reverts commit b43b8174c1.

Relpaced by commit fc9f57f643 ("usb: gadget: Fix spinlock lockup on usb_function_deactivate")

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
Tao Huang
2021-02-17 14:58:20 +08:00
parent 9360dab604
commit ab9fb85b0b

View File

@@ -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++;