Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1266679 > unrolled thread
| Started by | "Felipe F. Tonello" <eu@felipetonello.com> |
|---|---|
| First post | 2015-11-10 19:00 +0100 |
| Last post | 2015-11-13 09:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v5 2/7] usb: gadget: f_midi: remove duplicated code "Felipe F. Tonello" <eu@felipetonello.com> - 2015-11-10 19:00 +0100
Re: [PATCH v5 2/7] usb: gadget: f_midi: remove duplicated code Robert Baldyga <r.baldyga@samsung.com> - 2015-11-13 09:10 +0100
| From | "Felipe F. Tonello" <eu@felipetonello.com> |
|---|---|
| Date | 2015-11-10 19:00 +0100 |
| Subject | [PATCH v5 2/7] usb: gadget: f_midi: remove duplicated code |
| Message-ID | <qtln5-8aF-25@gated-at.bofh.it> |
This code is duplicated from f_midi_start_ep(midi, f, midi->out_ep).
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
---
drivers/usb/gadget/function/f_midi.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c
index eeb989d..488111d 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 =
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Robert Baldyga <r.baldyga@samsung.com> |
|---|---|
| Date | 2015-11-13 09:10 +0100 |
| Message-ID | <quhAJ-3Rt-7@gated-at.bofh.it> |
| In reply to | #1266679 |
On 11/10/2015 06:52 PM, Felipe F. Tonello wrote:
> This code is duplicated from f_midi_start_ep(midi, f, midi->out_ep).
>
> Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Reviewed-by: Robert Baldyga <r.baldyga@samsung.com>
> ---
> drivers/usb/gadget/function/f_midi.c | 19 -------------------
> 1 file changed, 19 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c
> index eeb989d..488111d 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 =
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web