projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1c0169
)
usb: gadget: f_acm: don't disable disabled EP
author
Michał Mirosław
<mirq-linux@rere.qmqm.pl>
Thu, 28 May 2020 18:30:28 +0000
(20:30 +0200)
committer
Felipe Balbi
<balbi@kernel.org>
Fri, 2 Oct 2020 06:43:36 +0000
(09:43 +0300)
Make debugging real problems easier by not trying to disable an EP that
was not yet enabled.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/function/f_acm.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/function/f_acm.c
b/drivers/usb/gadget/function/f_acm.c
index 200596ea9557c035f99eea9525eaf455ac449896..46647bfac2ef8d85eb5b354862f403b783f93bf8 100644
(file)
--- a/
drivers/usb/gadget/function/f_acm.c
+++ b/
drivers/usb/gadget/function/f_acm.c
@@
-425,9
+425,11
@@
static int acm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
/* we know alt == 0, so this is an activation or a reset */
if (intf == acm->ctrl_id) {
- dev_vdbg(&cdev->gadget->dev,
- "reset acm control interface %d\n", intf);
- usb_ep_disable(acm->notify);
+ if (acm->notify->enabled) {
+ dev_vdbg(&cdev->gadget->dev,
+ "reset acm control interface %d\n", intf);
+ usb_ep_disable(acm->notify);
+ }
if (!acm->notify->desc)
if (config_ep_by_speed(cdev->gadget, f, acm->notify))