driver->driver.bus = 0; 
driver->driver.bus = NULL; 
int usb_gadget_register_driver (struct usb_gadget_driver *driver){	int		status = -ENODEV;	struct omap_ep	*ep;	unsigned long	flags;	/* basic sanity tests */	if (!udc)		return -ENODEV;	if (!driver			// FIXME if otg, check:  driver->is_otg			|| driver->speed < USB_SPEED_FULL			|| !driver->bind			|| !driver->unbind			|| !driver->setup)		return -EINVAL;	spin_lock_irqsave(&udc->lock, flags);	if (udc->driver) {		spin_unlock_irqrestore(&udc->lock, flags);		return -EBUSY;	}	/* reset state */	list_for_each_entry (ep, &udc->gadget.ep_list, ep.ep_list) {		ep->irqs = 0;		if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC)			continue;		use_ep(ep, 0);		UDC_CTRL_REG = UDC_SET_HALT;	}	udc->ep0_pending = 0;	udc->ep[0].irqs = 0;	udc->softconnect = 1;	/* hook up the driver */	driver->driver.bus = 0;	udc->driver = driver;	udc->gadget.dev.driver = &driver->driver;	spin_unlock_irqrestore(&udc->lock, flags);	status = driver->bind (&udc->gadget);	if (status) {		DBG("bind to %s --> %d\n", driver->driver.name, status);		udc->gadget.dev.driver = 0;		udc->driver = 0;		goto done;	}	DBG("bound to driver %s\n", driver->driver.name);	UDC_IRQ_SRC_REG = UDC_IRQ_SRC_MASK;	/* connect to bus through transceiver */	if (udc->transceiver) {		status = otg_set_peripheral(udc->transceiver, &udc->gadget);		if (status < 0) {			ERR("can't bind to transceiver\n");			driver->unbind (&udc->gadget);			udc->gadget.dev.driver = 0;			udc->driver = 0;			goto done;		}	} else {		if (can_pullup(udc))			pullup_enable (udc);		else			pullup_disable (udc);	}	/* boards that don't have VBUS sensing can't autogate 48MHz;	 * can't enter deep sleep while a gadget driver is active.	 */	if (machine_is_omap_innovator() || machine_is_omap_osk())		omap_vbus_session(&udc->gadget, 1);done:	return status;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/313980c92724cf42877a7bdafdef439ee9d68ccb/omap_udc.c/buggy/drivers/usb/gadget/omap_udc.c