On Thu, 9 Jun 2011, Sebastian Andrzej Siewior wrote: > Alan Stern wrote: > > How do you deal with the fact that after this change, > > > > modprobe gadget_driver > > > > will fail if the UDC driver isn't already loaded? This could break > > some userspace scripts. > > The driver should be loaded by udev. There could be some breakage if > people are not using udev and rely on the fact that the gadget_driver will > pull in the only available gadget driver. > > In case we want to keep this behavior then it could be fixed. As of now > there can be only on udc selected at a time. We could use this information > and call try_then_request_module(). > If we do this, how long do we want to keep this compatibility? I guess we > can defer the question to this once someone wants a multi-gadget kernel :) This deserves a high-level discussion; it would be good to hear from Greg, Felipe, and other people. Maybe there could be a CONFIG_MULTI_UDC option (marked EXPERIMENTAL). If it's not set (the normal case) then there can be only one UDC driver configured, and the UDC core would automatically load it as needed, the way you described. If the option is set then more than one UDC driver can be configured and the user will be responsible for loading the appropriate UDC driver(s) before loading any gadget drivers. Alan Stern -- 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