|
@@ -171,6 +171,23 @@ struct usb_ep *usb_ep_autoconfig(
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(usb_ep_autoconfig);
|
|
|
|
|
|
+/**
|
|
|
+ * usb_ep_autoconfig_release - releases endpoint and set it to initial state
|
|
|
+ * @ep: endpoint which should be released
|
|
|
+ *
|
|
|
+ * This function can be used during function bind for endpoints obtained
|
|
|
+ * from usb_ep_autoconfig(). It unclaims endpoint claimed by
|
|
|
+ * usb_ep_autoconfig() to make it available for other functions. Endpoint
|
|
|
+ * which was released is no longer invalid and shouldn't be used in
|
|
|
+ * context of function which released it.
|
|
|
+ */
|
|
|
+void usb_ep_autoconfig_release(struct usb_ep *ep)
|
|
|
+{
|
|
|
+ ep->claimed = false;
|
|
|
+ ep->driver_data = NULL;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(usb_ep_autoconfig_release);
|
|
|
+
|
|
|
/**
|
|
|
* usb_ep_autoconfig_reset - reset endpoint autoconfig state
|
|
|
* @gadget: device for which autoconfig state will be reset
|