linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] s3c-hsudc: Use helper functions instead of generic container_of
Date: Sun, 8 Jan 2012 21:57:55 +0100	[thread overview]
Message-ID: <201201082157.55898.heiko@sntech.de> (raw)
In-Reply-To: <201201082156.44142.heiko@sntech.de>

The helper functions were definied but never used until now.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/usb/gadget/s3c-hsudc.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c
index df8661d..41b3a58 100644
--- a/drivers/usb/gadget/s3c-hsudc.c
+++ b/drivers/usb/gadget/s3c-hsudc.c
@@ -759,7 +759,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep,
 	unsigned long flags;
 	u32 ecr = 0;
 
-	hsep = container_of(_ep, struct s3c_hsudc_ep, ep);
+	hsep = our_ep(_ep);
 	if (!_ep || !desc || hsep->desc || _ep->name == ep0name
 		|| desc->bDescriptorType != USB_DT_ENDPOINT
 		|| hsep->bEndpointAddress != desc->bEndpointAddress
@@ -853,7 +853,7 @@ static void s3c_hsudc_free_request(struct usb_ep *ep, struct usb_request *_req)
 {
 	struct s3c_hsudc_req *hsreq;
 
-	hsreq = container_of(_req, struct s3c_hsudc_req, req);
+	hsreq = our_req(_req);
 	WARN_ON(!list_empty(&hsreq->queue));
 	kfree(hsreq);
 }
@@ -876,12 +876,12 @@ static int s3c_hsudc_queue(struct usb_ep *_ep, struct usb_request *_req,
 	u32 offset;
 	u32 csr;
 
-	hsreq = container_of(_req, struct s3c_hsudc_req, req);
+	hsreq = our_req(_req);
 	if ((!_req || !_req->complete || !_req->buf ||
 		!list_empty(&hsreq->queue)))
 		return -EINVAL;
 
-	hsep = container_of(_ep, struct s3c_hsudc_ep, ep);
+	hsep = our_ep(_ep);
 	hsudc = hsep->dev;
 	if (!hsudc->driver || hsudc->gadget.speed == USB_SPEED_UNKNOWN)
 		return -ESHUTDOWN;
@@ -935,7 +935,7 @@ static int s3c_hsudc_dequeue(struct usb_ep *_ep, struct usb_request *_req)
 	struct s3c_hsudc_req *hsreq;
 	unsigned long flags;
 
-	hsep = container_of(_ep, struct s3c_hsudc_ep, ep);
+	hsep = our_ep(_ep);
 	if (!_ep || hsep->ep.name == ep0name)
 		return -EINVAL;
 
-- 
1.7.2.3

  reply	other threads:[~2012-01-08 20:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-08 20:56 [PATCH 0/3] s3c-hsudc powerdomain using generic power domains Heiko Stübner
2012-01-08 20:57 ` Heiko Stübner [this message]
2012-01-24  9:36   ` [PATCH 1/3] s3c-hsudc: Use helper functions instead of generic container_of Felipe Balbi
2012-01-08 20:58 ` [PATCH 2/3] s3c-hsudc: add basic runtime_pm calls Heiko Stübner
2012-01-24  9:37   ` Felipe Balbi
2012-01-08 20:59 ` [PATCH 3/3] S3C2443: add power domain for usb phy Heiko Stübner
2012-01-24  9:38   ` Felipe Balbi
2012-01-24  9:50     ` Heiko Stübner
2012-01-24  9:51       ` Felipe Balbi
2012-01-24 10:09         ` Heiko Stübner
2012-01-24 10:12           ` Felipe Balbi
2012-01-24 10:13         ` Heiko Stübner
2012-01-24 10:15           ` Felipe Balbi
2012-01-24 10:31             ` Heiko Stübner
2012-01-24 13:01               ` Kukjin Kim
2012-01-24 13:07                 ` Felipe Balbi
2012-01-24 13:27                   ` Heiko Stübner
2012-01-24 13:30                     ` Felipe Balbi
2012-02-01 16:35                 ` Heiko Stübner

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=201201082157.55898.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).