Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 752025da authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: gadget: Fix race between pullup and USB entering into LPM"

parents 685ecbad e3693315
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3569,6 +3569,11 @@ static int ci13xxx_pullup(struct usb_gadget *_gadget, int is_active)
		return ret;
	}

	spin_lock_irqsave(udc->lock, flags);
	if (!udc->vbus_active) {
		spin_unlock_irqrestore(udc->lock, flags);
		return 0;
	}
	if (is_active) {
		if (udc->udc_driver->notify_event)
			udc->udc_driver->notify_event(udc,
@@ -3577,6 +3582,7 @@ static int ci13xxx_pullup(struct usb_gadget *_gadget, int is_active)
	} else {
		hw_device_state(0);
	}
	spin_unlock_irqrestore(udc->lock, flags);

	return 0;
}