diff options
author | Felipe F. Tonello <eu@felipetonello.com> | 2015-11-10 20:52:04 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-12-15 18:12:41 +0300 |
commit | bc1d3cdc9c3cbbd9040da8c53237e177c38048b0 (patch) | |
tree | b669c386fbba64d3727f1b3fdd978ade740b4c2e /drivers/usb/gadget/function/f_midi.c | |
parent | 4405a2ced55f375708669550cda750452885c9de (diff) | |
download | linux-bc1d3cdc9c3cbbd9040da8c53237e177c38048b0.tar.xz |
usb: gadget: f_midi: remove duplicated code
This code is duplicated from f_midi_start_ep(midi, f, midi->out_ep).
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>
Diffstat (limited to 'drivers/usb/gadget/function/f_midi.c')
-rw-r--r-- | drivers/usb/gadget/function/f_midi.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c index 898a570319f1..695cf75428e3 100644 --- a/drivers/usb/gadget/function/f_midi.c +++ b/drivers/usb/gadget/function/f_midi.c @@ -324,7 +324,6 @@ static int f_midi_start_ep(struct f_midi *midi, static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_midi *midi = func_to_midi(f); - struct usb_composite_dev *cdev = f->config->cdev; unsigned i; int err; @@ -340,24 +339,6 @@ static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) if (err) return err; - usb_ep_disable(midi->out_ep); - - err = config_ep_by_speed(midi->gadget, f, midi->out_ep); - if (err) { - ERROR(cdev, "can't configure %s: %d\n", - midi->out_ep->name, err); - return err; - } - - err = usb_ep_enable(midi->out_ep); - if (err) { - ERROR(cdev, "can't start %s: %d\n", - midi->out_ep->name, err); - return err; - } - - midi->out_ep->driver_data = midi; - /* allocate a bunch of read buffers and queue them all at once. */ for (i = 0; i < midi->qlen && err == 0; i++) { struct usb_request *req = |