mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Sojka <sojka@merica.cz>
To: linux-usb@vger.kernel.org
Cc: Bryan Wu <cooloney@gmail.com>, Felipe Balbi <balbi@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux LED Subsystem <linux-leds@vger.kernel.org>,
	linux-kernel@vger.kernel.org, michal.vokac@comap.cz
Subject: Re: [PATCH v3 1/2] usb: gadget: Refactor request completion
Date: Wed, 27 Aug 2014 15:43:26 +0200	[thread overview]
Message-ID: <87egw2m4jl.fsf@steelpick.2x.cz> (raw)
In-Reply-To: <1409144625-25274-2-git-send-email-sojka@merica.cz>

On Wed, Aug 27 2014, Michal Sojka wrote:
> All USB peripheral controller drivers called completion routines
> directly. This patch moves the completion call from drivers to
> usb_gadget_giveback_request(), in order to have a place where common
> functionality can be added.
>
> All places in drivers/usb/ matching "[-.]complete(" were replaced with a
> call to usb_gadget_giveback_request(). This was compile-tested with all
> ARM drivers enabled and runtime-tested for musb.

[...]

> diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
> index b0d9817..2eb0ae4 100644
> --- a/drivers/usb/gadget/udc/udc-core.c
> +++ b/drivers/usb/gadget/udc/udc-core.c
> @@ -102,6 +102,15 @@ void usb_gadget_unmap_request(struct usb_gadget *gadget,
>  }
>  EXPORT_SYMBOL_GPL(usb_gadget_unmap_request);
>  
> +void usb_gadget_giveback_request(struct usb_ep *ep,
> +		struct usb_request *req)
> +{
> +	/* complete() is from gadget layer,
> +	 * eg fsg->bulk_in_complete() */
> +	if (req->complete)
> +		req->complete(ep, req);
> +}
> +EXPORT_SYMBOL_GPL(usb_gadget_giveback_request);
>  #endif	/* CONFIG_HAS_DMA */

#endif should be before usb_gadget_giveback_request(). I'll fix this in
v4.

-Michal

  reply	other threads:[~2014-08-27 20:14 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-22 11:53 [PATCH 1/2] leds: usb: Add LED trigger for USB gadget activity Michal Sojka
2014-08-22 11:53 ` [PATCH 2/2] leds: usb: Add LED trigger for USB host activity Michal Sojka
2014-08-22 17:39 ` [PATCH 1/2] leds: usb: Add LED trigger for USB gadget activity Bryan Wu
2014-08-22 21:42   ` Greg Kroah-Hartman
2014-08-22 23:41     ` Bryan Wu
2014-08-22 23:44     ` Michal Sojka
2014-08-22 21:59 ` Felipe Balbi
2014-08-22 23:54   ` Michal Sojka
2014-08-23  0:08     ` [PATCH v2 0/3] LED triggers for USB host and device Michal Sojka
2014-08-23  0:08       ` [PATCH v2 1/3] usb: Add missing #include Michal Sojka
2014-08-23  0:08       ` [PATCH v2 2/3] usb: Add LED trigger for USB host activity Michal Sojka
2014-08-23  0:30         ` Bryan Wu
2014-08-23  9:52           ` Michal Sojka
2014-08-25 18:59             ` Bryan Wu
2014-08-27 13:03               ` [PATCH v3 0/2] LED triggers for USB host and device Michal Sojka
2014-08-27 13:03                 ` [PATCH v3 1/2] usb: gadget: Refactor request completion Michal Sojka
2014-08-27 13:43                   ` Michal Sojka [this message]
2014-08-27 15:03                   ` Alan Stern
2014-08-27 20:17                   ` Felipe Balbi
2014-08-27 13:03                 ` [PATCH v3 2/2] usb: Add LED triggers for USB activity Michal Sojka
2014-08-27 19:27                   ` Greg Kroah-Hartman
2014-08-27 19:30                     ` Felipe Balbi
2014-08-27 20:57                       ` [PATCH v4 0/3] LED triggers for USB host and device Michal Sojka
2014-08-27 20:57                         ` [PATCH v4 1/3] usb: gadget: Refactor request completion Michal Sojka
2014-08-27 21:03                           ` Alan Stern
2014-08-27 21:09                           ` Greg Kroah-Hartman
2014-08-27 20:57                         ` [PATCH v4 2/3] usb: Rename usb-common.c Michal Sojka
2014-08-27 20:58                         ` [PATCH v4 3/3] usb: Add LED triggers for USB activity Michal Sojka
2014-08-27 21:08                           ` Greg Kroah-Hartman
2014-08-29 12:57                             ` Michal Sojka
2014-08-29 13:07                               ` [PATCH v5 0/3] LED triggers for USB host and device Michal Sojka
2014-08-29 13:07                                 ` [PATCH v5 1/3] usb: gadget: Refactor request completion Michal Sojka
2014-08-29 13:07                                 ` [PATCH v5 2/3] usb: Rename usb-common.c Michal Sojka
2014-08-29 13:07                                 ` [PATCH v5 3/3] usb: Add LED triggers for USB activity Michal Sojka
2014-08-23  0:08       ` [PATCH v2 3/3] usb: Add LED trigger for USB gadget activity Michal Sojka
2014-08-23  0:23       ` [PATCH v2 0/3] LED triggers for USB host and device Bryan Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87egw2m4jl.fsf@steelpick.2x.cz \
    --to=sojka@merica.cz \
    --cc=balbi@ti.com \
    --cc=cooloney@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=michal.vokac@comap.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®