In gadget mode, musb->is_active should be set only when connected to the
host. musb_g_reset() already takes care of it.
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
musb->gadget_driver = driver;
spin_lock_irqsave(&musb->lock, flags);
musb->gadget_driver = driver;
spin_lock_irqsave(&musb->lock, flags);
otg_set_peripheral(otg, &musb->g);
musb->xceiv->state = OTG_STATE_B_IDLE;
otg_set_peripheral(otg, &musb->g);
musb->xceiv->state = OTG_STATE_B_IDLE;