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

Commit 2288b1b6 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents b701a27c c86f3475
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -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;
}
+10 −0
Original line number Diff line number Diff line
@@ -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);
}

+2 −2
Original line number Diff line number Diff line
@@ -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.
 */