Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: gadget: set gadget state as configured

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>

authored by

Peter Chen and committed by
Felipe Balbi
6027f317 1f7fc408

+2
+1
drivers/usb/gadget/composite.c
··· 634 634 if (!c) 635 635 goto done; 636 636 637 + usb_gadget_set_state(gadget, USB_STATE_CONFIGURED); 637 638 cdev->config = c; 638 639 639 640 /* Initialize all interfaces by setting them to altsetting zero. */
+1
drivers/usb/gadget/inode.c
··· 1494 1494 */ 1495 1495 if (value == 0) { 1496 1496 INFO (dev, "configuration #%d\n", dev->current_config); 1497 + usb_gadget_set_state(gadget, USB_STATE_CONFIGURED); 1497 1498 if (dev->usermode_setup) { 1498 1499 dev->setup_can_stall = 0; 1499 1500 goto delegate;