usb: dwc3: gadget: implement gadget state tracking

make use of the previously introduced gadget->state
field.

Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Felipe Balbi
2011-12-19 13:01:52 +02:00
parent 49401f4169
commit 14cd592f72
2 changed files with 13 additions and 4 deletions

View File

@@ -2137,7 +2137,7 @@ static void dwc3_gadget_reset_interrupt(struct dwc3 *dwc)
}
/* after reset -> Default State */
dwc->dev_state = DWC3_DEFAULT_STATE;
usb_gadget_set_state(&dwc->gadget, USB_STATE_DEFAULT);
/* Recent versions support automatic phy suspend and don't need this */
if (dwc->revision < DWC3_REVISION_194A) {