diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-23 08:04:08 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-23 08:04:08 +0100 |
commit | d2e971d884e7b7e65162788b8f3b7801cd8bc137 (patch) | |
tree | 5f95f2e0e98d4181c50301e6dfa39cc87aa1c17a /drivers/usb/chipidea/udc.c | |
parent | Merge tag 'phy-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/kish... (diff) | |
parent | Linux 5.6-rc7 (diff) | |
download | linux-d2e971d884e7b7e65162788b8f3b7801cd8bc137.tar.xz linux-d2e971d884e7b7e65162788b8f3b7801cd8bc137.zip |
Merge 5.6-rc7 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/udc.c')
-rw-r--r-- | drivers/usb/chipidea/udc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index ffa6caee1f3b..921bcf14dc06 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1530,18 +1530,19 @@ static const struct usb_ep_ops usb_ep_ops = { static void ci_hdrc_gadget_connect(struct usb_gadget *_gadget, int is_active) { struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget); - unsigned long flags; if (is_active) { pm_runtime_get_sync(ci->dev); hw_device_reset(ci); - spin_lock_irqsave(&ci->lock, flags); + spin_lock_irq(&ci->lock); if (ci->driver) { hw_device_state(ci, ci->ep0out->qh.dma); usb_gadget_set_state(_gadget, USB_STATE_POWERED); + spin_unlock_irq(&ci->lock); usb_udc_vbus_handler(_gadget, true); + } else { + spin_unlock_irq(&ci->lock); } - spin_unlock_irqrestore(&ci->lock, flags); } else { usb_udc_vbus_handler(_gadget, false); if (ci->driver) |