Set gadget device state as configurated after set configuration
has finished.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
        if (!c)
                goto done;
 
+       usb_gadget_set_state(gadget, USB_STATE_CONFIGURED);
        cdev->config = c;
 
        /* Initialize all interfaces by setting them to altsetting zero. */
 
                 */
                if (value == 0) {
                        INFO (dev, "configuration #%d\n", dev->current_config);
+                       usb_gadget_set_state(gadget, USB_STATE_CONFIGURED);
                        if (dev->usermode_setup) {
                                dev->setup_can_stall = 0;
                                goto delegate;