diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-04-17 06:01:38 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-04-17 06:01:37 -0700 |
commit | 8aa78dc58040a7cd9b9081a25ccc89836903eb18 (patch) | |
tree | cd5efbe11c56aae6043b2332c067fa1beadaaffe | |
parent | 0d6721c1e48310f982ad8e3f6d31c60fbd193755 (diff) | |
parent | 61add90b905cda22bdd98f743bda7738247bb2f2 (diff) |
Merge "usb: gadget: ffs: Fix runtime PM usage count for multiple set_alt"
-rw-r--r-- | drivers/usb/gadget/function/f_fs.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index d794d3b3b48e..7c35241a487a 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -1189,7 +1189,7 @@ static ssize_t ffs_epfile_read_iter(struct kiocb *kiocb, struct iov_iter *to) *to = p->data; } - ffs_log("enter"); + ffs_log("exit"); return res; } @@ -3384,6 +3384,8 @@ static int ffs_func_set_alt(struct usb_function *f, if (ffs->func) { ffs_func_eps_disable(ffs->func); ffs->func = NULL; + /* matching put to allow LPM on disconnect */ + usb_gadget_autopm_put_async(ffs->gadget); } if (ffs->state == FFS_DEACTIVATED) { @@ -3417,14 +3419,9 @@ static int ffs_func_set_alt(struct usb_function *f, static void ffs_func_disable(struct usb_function *f) { - struct ffs_function *func = ffs_func_from_usb(f); - struct ffs_data *ffs = func->ffs; - ffs_log("enter"); ffs_func_set_alt(f, 0, (unsigned)-1); - /* matching put to allow LPM on disconnect */ - usb_gadget_autopm_put_async(ffs->gadget); ffs_log("exit"); } |