/* On successful return, the gadget is ready to respond to requests from the host, unless one of its components invokes usb_gadget_disconnect() while it was binding. That would usually be done in order to wait for some userspace participation.  */
int usb_composite_register(struct usb_composite_driver *driver)
/* On successful return, the gadget is ready to respond to requests from the host, unless one of its components invokes usb_gadget_disconnect() while it was binding. That would usually be done in order to wait for some userspace participation.  */
int usb_composite_register(struct usb_composite_driver *driver)
{
	int res;
	if (!driver || !driver->dev || !driver->bind || composite)
		return -EINVAL;
	if (!driver->name)
		driver->name = "composite";
	composite = driver;
	res = usb_gadget_register_driver(&composite_driver);
	if (res != 0)
		composite = NULL;
	return res;
}