Skip to content

Commit

Permalink
usb: gadget: set gadget state as configured
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Chen authored and Felipe Balbi committed May 12, 2014
1 parent 1f7fc40 commit 6027f31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/gadget/composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ static int set_config(struct usb_composite_dev *cdev,
if (!c)
goto done;

usb_gadget_set_state(gadget, USB_STATE_CONFIGURED);
cdev->config = c;

/* Initialize all interfaces by setting them to altsetting zero. */
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/gadget/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
*/
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;
Expand Down

0 comments on commit 6027f31

Please sign in to comment.