projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8aa90cf
)
usb: gadget: f_midi: Transmit data only when IN ep is enabled
author
Felipe F. Tonello
<eu@felipetonello.com>
Tue, 10 Nov 2015 17:52:03 +0000
(17:52 +0000)
committer
Felipe Balbi
<balbi@ti.com>
Thu, 19 Nov 2015 20:48:50 +0000
(14:48 -0600)
This makes sure f_midi doesn't try to enqueue data when the IN endpoint is
disabled, ie, USB cable is disconnected.
Reviewed-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_midi.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/function/f_midi.c
b/drivers/usb/gadget/function/f_midi.c
index 42acb45e1ab42dd9436244bec16d4903603d6089..7877aa8e2aec54ec0b7bb80de1e82012e4556780 100644
(file)
--- a/
drivers/usb/gadget/function/f_midi.c
+++ b/
drivers/usb/gadget/function/f_midi.c
@@
-545,7
+545,7
@@
static void f_midi_transmit(struct f_midi *midi, struct usb_request *req)
}
}
- if (req->length > 0) {
+ if (req->length > 0
&& ep->enabled
) {
int err;
err = usb_ep_queue(ep, req, GFP_ATOMIC);