d89eaadd61881b849791cfc2fd7d0963759fe338
[openembedded.git] /
1 From d408894fa4263440ed8a9e68566bacea7e6f6bed Mon Sep 17 00:00:00 2001
2 From: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
3 Date: Fri, 27 Mar 2009 12:57:50 -0700
4 Subject: [PATCH] musb_host: streamline musb_cleanup_urb() calls
5
6 The argument for the 'is_in' parameter of musb_cleanup_urb()
7 is always extracted from an URB that's passed to the function.
8 So that parameter is superfluous; remove it.
9
10 Signed-off-by: Sergei Shtylyov <sshtylyov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
11 Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
12 ---
13  drivers/usb/musb/musb_host.c |    9 +++++----
14  1 files changed, 5 insertions(+), 4 deletions(-)
15
16 diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
17 index e121e0e..71e835e 100644
18 --- a/drivers/usb/musb/musb_host.c
19 +++ b/drivers/usb/musb/musb_host.c
20 @@ -1950,14 +1950,15 @@ done:
21   * called with controller locked, irqs blocked
22   * that hardware queue advances to the next transfer, unless prevented
23   */
24 -static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh, int is_in)
25 +static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh)
26  {
27         struct musb_hw_ep       *ep = qh->hw_ep;
28         void __iomem            *epio = ep->regs;
29         unsigned                hw_end = ep->epnum;
30         void __iomem            *regs = ep->musb->mregs;
31 -       u16                     csr;
32 +       int                     is_in = usb_pipein(urb->pipe);
33         int                     status = 0;
34 +       u16                     csr;
35  
36         musb_ep_select(regs, hw_end);
37  
38 @@ -2056,7 +2057,7 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
39                         kfree(qh);
40                 }
41         } else
42 -               ret = musb_cleanup_urb(urb, qh, urb->pipe & USB_DIR_IN);
43 +               ret = musb_cleanup_urb(urb, qh);
44  done:
45         spin_unlock_irqrestore(&musb->lock, flags);
46         return ret;
47 @@ -2090,7 +2091,7 @@ musb_h_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep)
48                         urb->status = -ESHUTDOWN;
49  
50                 /* cleanup */
51 -               musb_cleanup_urb(urb, qh, urb->pipe & USB_DIR_IN);
52 +               musb_cleanup_urb(urb, qh);
53  
54                 /* Then nuke all the others ... and advance the
55                  * queue on hw_ep (e.g. bulk ring) when we're done.
56 -- 
57 1.6.0.4
58