Merge "dwc3: gadget: Remove pm_runtime calls from dwc3_gadget_ep_disable"

This commit is contained in:
qctecmdr 2022-02-22 19:00:09 -08:00 • committed by Gerrit - the friendly Code Review server
commit 2288b1b627
3 changed files with 12 additions and 11 deletions

View file

@ -966,7 +966,6 @@ static int dwc3_gadget_ep_disable(struct usb_ep *ep)
struct dwc3 *dwc;
unsigned long flags;
int ret;
bool call_rpm_put = false;
if (!ep) {
pr_debug("dwc3: invalid parameters\n");
@ -981,18 +980,10 @@ static int dwc3_gadget_ep_disable(struct usb_ep *ep)
dep->name))
return 0;
if (atomic_read(&dwc->in_lpm)) {
pm_runtime_get_sync(dwc->sysdev);
call_rpm_put = true;
}
spin_lock_irqsave(&dwc->lock, flags);
ret = __dwc3_gadget_ep_disable(dep);
dbg_event(dep->number, "DISABLE", ret);
spin_unlock_irqrestore(&dwc->lock, flags);
if (call_rpm_put) {
pm_runtime_mark_last_busy(dwc->sysdev);
pm_runtime_put_autosuspend(dwc->sysdev);
}
return ret;
}

View file

@ -2301,6 +2301,16 @@ static void fsg_disable(struct usb_function *f)
{
struct fsg_dev *fsg = fsg_from_func(f);
/* Disable the endpoints */
if (fsg->bulk_in_enabled) {
usb_ep_disable(fsg->bulk_in);
fsg->bulk_in_enabled = 0;
}
if (fsg->bulk_out_enabled) {
usb_ep_disable(fsg->bulk_out);
fsg->bulk_out_enabled = 0;
}
__raise_exception(fsg->common, FSG_STATE_CONFIG_CHANGE, NULL);
}

View file

@ -87,7 +87,7 @@ EXPORT_SYMBOL_GPL(usb_ep_set_maxpacket_limit);
* configurable, with more generic names like "ep-a". (remember that for
* USB, "in" means "towards the USB master".)
*
* This routine must be called in process context.
* This routine may be called in an atomic (interrupt) context..
*
* returns zero, or a negative error code.
*/
@ -132,7 +132,7 @@ EXPORT_SYMBOL_GPL(usb_ep_enable);
* gadget drivers must call usb_ep_enable() again before queueing
* requests to the endpoint.
*
* This routine must be called in process context.
* This routine may be called in an atomic (interrupt) context.
*
* returns zero, or a negative error code.
*/