diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-03-31 21:24:24 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-03-31 21:24:24 -0700 |
| commit | b2e759993b142d9465dac1900e8719a35fc0fc81 (patch) | |
| tree | 5265500c51627d80440af4cec33a20fbe95fdd77 | |
| parent | 8a493b9beea7589d8efa436152eb8ee3ea83cdfe (diff) | |
| parent | 265b668a1047f345aa2b69178f54dbf38c95c47b (diff) | |
Merge "usb: gadget: f_mass_storage: Perform async runtime resume upon set_alt"
| -rw-r--r-- | drivers/usb/gadget/function/f_mass_storage.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c index e309dec68a75..1fd5a95b6e99 100644 --- a/drivers/usb/gadget/function/f_mass_storage.c +++ b/drivers/usb/gadget/function/f_mass_storage.c @@ -2336,9 +2336,6 @@ reset: bh->outreq->complete = bulk_out_complete; } - /* prevents usb LPM until thread runs to completion */ - usb_gadget_autopm_get_noresume(common->gadget); - common->running = 1; for (i = 0; i < ARRAY_SIZE(common->luns); ++i) if (common->luns[i]) @@ -2354,6 +2351,10 @@ 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; + + /* prevents usb LPM until thread runs to completion */ + usb_gadget_autopm_get_async(fsg->common->gadget); + raise_exception(fsg->common, FSG_STATE_CONFIG_CHANGE); return USB_GADGET_DELAYED_STATUS; } |
