> usb_gadget_register_driver/usb_gadget_unregister_driver > function > > that are declared in each driver. > > > > For avoiding that I propose to do a redirection for > these functions. > > At probe time the driver register them > (usb_gadget_register_udc), > > and > usb_gadget_register_driver/usb_gadget_unregister_driver > call > > these callback. > > > > Only one probing should succeed, so only one call to > > usb_gadget_register_udc is done. It not, only the > first one will > > succeed. > > > > I attach a draft of that. > > > > What do you think of it ? It's incomplete since only one USB peripheral controller driver is even partially converted to use this, and having it work relies on all of them being converted first .... Plus, the generic "everyone calls these" functions are part of that driver, while they need to be generic code (maybe a new file) that any UDC driver can call ... I guess I won't object much to the idea, just its incomplete execution. > I like the idea, thanks. Don't know too much about > the implementation, > I'll let David be the judge of that. > > -- 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