brcm2708: update against latest rpi-3.10.y branch
[openwrt/svn-archive/archive.git] / target / linux / brcm2708 / patches-3.10 / 0081-dwc_otg-whitespace-cleanup-in-dwc_otg_urb_enqueue.patch
1 From a7ae411621bcf80fcb2f920084183d98adb6213b 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/174] 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 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
11 +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
12 @@ -733,10 +733,10 @@ static int dwc_otg_urb_enqueue(struct us
13 if(dwc_otg_urb == NULL)
14 return -ENOMEM;
15
16 - urb->hcpriv = dwc_otg_urb;
17 - if (!dwc_otg_urb && urb->number_of_packets)
18 - return -ENOMEM;
19 -
20 + urb->hcpriv = dwc_otg_urb;
21 + if (!dwc_otg_urb && urb->number_of_packets)
22 + return -ENOMEM;
23 +
24 dwc_otg_hcd_urb_set_pipeinfo(dwc_otg_urb, usb_pipedevice(urb->pipe),
25 usb_pipeendpoint(urb->pipe), ep_type,
26 usb_pipein(urb->pipe),
27 @@ -776,36 +776,35 @@ static int dwc_otg_urb_enqueue(struct us
28 }
29
30 #if USB_URB_EP_LINKING
31 - DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
32 + DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
33 retval = usb_hcd_link_urb_to_ep(hcd, urb);
34 - DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
35 - if (0 == retval)
36 + DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
37 + if (0 == retval)
38 #endif
39 - {
40 - retval = dwc_otg_hcd_urb_enqueue(dwc_otg_hcd, dwc_otg_urb,
41 - /*(dwc_otg_qh_t **)*/
42 - ref_ep_hcpriv,
43 - mem_flags == GFP_ATOMIC ? 1 : 0);
44 - if (0 == retval) {
45 - if (alloc_bandwidth) {
46 - allocate_bus_bandwidth(hcd,
47 - dwc_otg_hcd_get_ep_bandwidth(
48 - dwc_otg_hcd, *ref_ep_hcpriv),
49 - urb);
50 - }
51 - } else {
52 + {
53 + retval = dwc_otg_hcd_urb_enqueue(dwc_otg_hcd, dwc_otg_urb,
54 + /*(dwc_otg_qh_t **)*/
55 + ref_ep_hcpriv,
56 + mem_flags == GFP_ATOMIC ? 1 : 0);
57 + if (0 == retval) {
58 + if (alloc_bandwidth) {
59 + allocate_bus_bandwidth(hcd,
60 + dwc_otg_hcd_get_ep_bandwidth(
61 + dwc_otg_hcd, *ref_ep_hcpriv),
62 + urb);
63 + }
64 + } else {
65 #if USB_URB_EP_LINKING
66 - dwc_irqflags_t irqflags;
67 - DWC_DEBUGPL(DBG_HCD, "DWC OTG dwc_otg_hcd_urb_enqueue failed rc %d\n", retval);
68 - DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
69 - usb_hcd_unlink_urb_from_ep(hcd, urb);
70 - DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
71 + dwc_irqflags_t irqflags;
72 + DWC_DEBUGPL(DBG_HCD, "DWC OTG dwc_otg_hcd_urb_enqueue failed rc %d\n", retval);
73 + DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
74 + usb_hcd_unlink_urb_from_ep(hcd, urb);
75 + DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
76 #endif
77 - if (retval == -DWC_E_NO_DEVICE) {
78 - retval = -ENODEV;
79 - }
80 - }
81 - }
82 + if (retval == -DWC_E_NO_DEVICE)
83 + retval = -ENODEV;
84 + }
85 + }
86 return retval;
87 }
88