Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248845
b: refs/heads/master
c: 95ed323
h: refs/heads/master
i:
  248843: c4697a6
v: v3
  • Loading branch information
Roger Quadros authored and Greg Kroah-Hartman committed May 10, 2011
1 parent 6d53d30 commit a154e12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b9ba000177ee47bcc5b44c7c34e48e735f5f9b1
refs/heads/master: 95ed32366748e2034e82c9e738c312df8fb3d3a9
6 changes: 5 additions & 1 deletion trunk/drivers/usb/gadget/f_mass_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ struct fsg_operations {
/* Data shared by all the FSG instances. */
struct fsg_common {
struct usb_gadget *gadget;
struct usb_composite_dev *cdev;
struct fsg_dev *fsg, *new_fsg;
wait_queue_head_t fsg_wait;

Expand Down Expand Up @@ -2441,7 +2442,7 @@ static int fsg_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
struct fsg_dev *fsg = fsg_from_func(f);
fsg->common->new_fsg = fsg;
raise_exception(fsg->common, FSG_STATE_CONFIG_CHANGE);
return 0;
return USB_GADGET_DELAYED_STATUS;
}

static void fsg_disable(struct usb_function *f)
Expand Down Expand Up @@ -2577,6 +2578,8 @@ static void handle_exception(struct fsg_common *common)

case FSG_STATE_CONFIG_CHANGE:
do_set_interface(common, common->new_fsg);
if (common->new_fsg)
usb_composite_setup_continue(common->cdev);
break;

case FSG_STATE_EXIT:
Expand Down Expand Up @@ -2747,6 +2750,7 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common,
common->gadget = gadget;
common->ep0 = gadget->ep0;
common->ep0req = cdev->req;
common->cdev = cdev;

/* Maybe allocate device-global string IDs, and patch descriptors */
if (fsg_strings[FSG_STRING_INTERFACE].id == 0) {
Expand Down

0 comments on commit a154e12

Please sign in to comment.