Noticed this later, On 06/14/2011 05:09 PM, Balbi, Felipe wrote:
+/** + * usb_del_gadget_udc - deletes @udc from udc_list + * @udc: the udc to be removed. + * + * This, will call usb_gadget_unregister_driver() if
should be usb_gadget_remove_driver() ?
+ * the @udc is still busy. + */ +void usb_del_gadget_udc(struct usb_gadget *gadget) +{ + struct usb_udc *udc = NULL; + + dev_vdbg(gadget->dev.parent, "unregistering gadget\n"); + + mutex_lock(&udc_lock); + list_for_each_entry(udc,&udc_list, list) + if (udc->gadget == gadget) + goto found; + + dev_err(gadget->dev.parent, "gadget not registered.\n"); + mutex_unlock(&udc_lock); + return; +found: + list_del(&udc->list); + mutex_unlock(&udc_lock); + + if (udc->driver) + usb_gadget_remove_driver(udc); + + kobject_uevent(&udc->dev.kobj, KOBJ_REMOVE); + device_unregister(&udc->dev); +} +EXPORT_SYMBOL_GPL(usb_del_gadget_udc);
-- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html