ixp4xx: remove linux 3.10 support
[openwrt.git] / target / linux / brcm2708 / patches-3.10 / 0081-dwc_otg-whitespace-cleanup-in-dwc_otg_urb_enqueue.patch
1 From 2f244c31c0fdb6e02bd58dfbcca018d8e2366291 Mon Sep 17 00:00:00 2001
2 From: P33M <P33M@github.com>
3 Date: Thu, 18 Jul 2013 16:32:41 +0100
4 Subject: [PATCH 081/196] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue
5
6 ---
7  drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 59 ++++++++++++++--------------
8  1 file changed, 29 insertions(+), 30 deletions(-)
9
10 diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
11 index 0d6f5f4..0f72bd5 100644
12 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
13 +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
14 @@ -733,10 +733,10 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
15         if(dwc_otg_urb == NULL)
16                 return -ENOMEM;
17  
18 -        urb->hcpriv = dwc_otg_urb;
19 -        if (!dwc_otg_urb && urb->number_of_packets)
20 -                return -ENOMEM;
21 -        
22 +       urb->hcpriv = dwc_otg_urb;
23 +       if (!dwc_otg_urb && urb->number_of_packets)
24 +               return -ENOMEM;
25 +
26         dwc_otg_hcd_urb_set_pipeinfo(dwc_otg_urb, usb_pipedevice(urb->pipe),
27                                      usb_pipeendpoint(urb->pipe), ep_type,
28                                      usb_pipein(urb->pipe),
29 @@ -776,36 +776,35 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
30         }
31  
32  #if USB_URB_EP_LINKING
33 -        DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
34 +       DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
35         retval = usb_hcd_link_urb_to_ep(hcd, urb);
36 -        DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
37 -       if (0 == retval) 
38 +       DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
39 +       if (0 == retval)
40  #endif
41 -        {
42 -                retval = dwc_otg_hcd_urb_enqueue(dwc_otg_hcd, dwc_otg_urb,
43 -                                                 /*(dwc_otg_qh_t **)*/
44 -                                                 ref_ep_hcpriv, 
45 -                                                 mem_flags == GFP_ATOMIC ? 1 : 0);
46 -                if (0 == retval) {
47 -                        if (alloc_bandwidth) {
48 -                                allocate_bus_bandwidth(hcd,
49 -                                        dwc_otg_hcd_get_ep_bandwidth(
50 -                                                dwc_otg_hcd, *ref_ep_hcpriv),
51 -                                                       urb);
52 -                        }
53 -                } else {
54 +       {
55 +               retval = dwc_otg_hcd_urb_enqueue(dwc_otg_hcd, dwc_otg_urb,
56 +                                               /*(dwc_otg_qh_t **)*/
57 +                                               ref_ep_hcpriv,
58 +                                               mem_flags == GFP_ATOMIC ? 1 : 0);
59 +               if (0 == retval) {
60 +                       if (alloc_bandwidth) {
61 +                               allocate_bus_bandwidth(hcd,
62 +                                               dwc_otg_hcd_get_ep_bandwidth(
63 +                                                       dwc_otg_hcd, *ref_ep_hcpriv),
64 +                                               urb);
65 +                       }
66 +               } else {
67  #if USB_URB_EP_LINKING
68 -                       dwc_irqflags_t irqflags;
69 -                        DWC_DEBUGPL(DBG_HCD, "DWC OTG dwc_otg_hcd_urb_enqueue failed rc %d\n", retval);
70 -                        DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
71 -                        usb_hcd_unlink_urb_from_ep(hcd, urb);
72 -                        DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
73 +                       dwc_irqflags_t irqflags;
74 +                       DWC_DEBUGPL(DBG_HCD, "DWC OTG dwc_otg_hcd_urb_enqueue failed rc %d\n", retval);
75 +                       DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
76 +                       usb_hcd_unlink_urb_from_ep(hcd, urb);
77 +                       DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
78  #endif
79 -                        if (retval == -DWC_E_NO_DEVICE) {
80 -                                retval = -ENODEV;
81 -                        }
82 -                }
83 -        }
84 +                       if (retval == -DWC_E_NO_DEVICE)
85 +                               retval = -ENODEV;
86 +               }
87 +       }
88         return retval;
89  }
90  
91 -- 
92 1.9.1
93