spin_unlock_irqrestore(&dev->lock, flags);
driver->unbind(&dev->gadget);
+ dev->gadget.dev.driver = NULL;
dev->driver = NULL;
/* set SD */
local_irq_enable();
driver->unbind(&udc->gadget);
+ udc->gadget.dev.driver = NULL;
+ udc->gadget.dev.driver_data = NULL;
udc->driver = NULL;
DBG("unbound from %s\n", driver->driver.name);
spin_unlock_irqrestore(&dev->lock, flags);
driver->unbind(&dev->gadget);
+ dev->gadget.dev.driver = NULL;
DBG(dev, "unregistered driver '%s'\n", driver->driver.name);
return 0;
spin_unlock_irqrestore(&dev->lock, flags);
driver->unbind(&dev->gadget);
+ dev->gadget.dev.driver = NULL;
device_del(&dev->gadget.dev);
udc_disable(dev);
m66592_bclr(m66592, M66592_VBSE | M66592_URST, M66592_INTENB0);
driver->unbind(&m66592->gadget);
+ m66592->gadget.dev.driver = NULL;
init_controller(m66592);
disable_controller(m66592);
local_irq_enable();
driver->unbind(&dev->gadget);
+ dev->gadget.dev.driver = NULL;
dev->driver = NULL;
device_del (&dev->gadget.dev);