summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorJiebing Li <jiebing.li@intel.com>2014-12-11 13:26:29 +0800
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-03-29 09:30:31 +0300
commitad14d4e0308afda06a60036020a15025571604af (patch)
treed6d4c8fed5984f1ebb7e0b09f03743d3464bb674 /drivers/usb/dwc3
parentf59dcab176293b646e1358144c93c58c3cda2813 (diff)
downloadop-kernel-dev-ad14d4e0308afda06a60036020a15025571604af.zip
op-kernel-dev-ad14d4e0308afda06a60036020a15025571604af.tar.gz
usb: dwc3: gadget: release spin lock during gadget resume
It's a requirement that we release controller's lock while calling gadget API function pointers. This patch just fixes that long standing bug. Signed-off-by: Jiebing Li <jiebing.li@intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/gadget.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 3ac170f..3d2c53e 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2487,7 +2487,11 @@ static void dwc3_gadget_wakeup_interrupt(struct dwc3 *dwc)
* implemented.
*/
- dwc->gadget_driver->resume(&dwc->gadget);
+ if (dwc->gadget_driver && dwc->gadget_driver->resume) {
+ spin_unlock(&dwc->lock);
+ dwc->gadget_driver->resume(&dwc->gadget);
+ spin_lock(&dwc->lock);
+ }
}
static void dwc3_gadget_linksts_change_interrupt(struct dwc3 *dwc,
OpenPOWER on IntegriCloud