wifipineapple-openwrt/target/linux/brcm2708/patches-3.10/0081-dwc_otg-whitespace-cle...

94 lines
3.4 KiB
Diff

From 2f244c31c0fdb6e02bd58dfbcca018d8e2366291 Mon Sep 17 00:00:00 2001
From: P33M <P33M@github.com>
Date: Thu, 18 Jul 2013 16:32:41 +0100
Subject: [PATCH 081/196] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue
---
drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 59 ++++++++++++++--------------
1 file changed, 29 insertions(+), 30 deletions(-)
diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
index 0d6f5f4..0f72bd5 100644
--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
@@ -733,10 +733,10 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
if(dwc_otg_urb == NULL)
return -ENOMEM;
- urb->hcpriv = dwc_otg_urb;
- if (!dwc_otg_urb && urb->number_of_packets)
- return -ENOMEM;
-
+ urb->hcpriv = dwc_otg_urb;
+ if (!dwc_otg_urb && urb->number_of_packets)
+ return -ENOMEM;
+
dwc_otg_hcd_urb_set_pipeinfo(dwc_otg_urb, usb_pipedevice(urb->pipe),
usb_pipeendpoint(urb->pipe), ep_type,
usb_pipein(urb->pipe),
@@ -776,36 +776,35 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
}
#if USB_URB_EP_LINKING
- DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
+ DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
retval = usb_hcd_link_urb_to_ep(hcd, urb);
- DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
- if (0 == retval)
+ DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
+ if (0 == retval)
#endif
- {
- retval = dwc_otg_hcd_urb_enqueue(dwc_otg_hcd, dwc_otg_urb,
- /*(dwc_otg_qh_t **)*/
- ref_ep_hcpriv,
- mem_flags == GFP_ATOMIC ? 1 : 0);
- if (0 == retval) {
- if (alloc_bandwidth) {
- allocate_bus_bandwidth(hcd,
- dwc_otg_hcd_get_ep_bandwidth(
- dwc_otg_hcd, *ref_ep_hcpriv),
- urb);
- }
- } else {
+ {
+ retval = dwc_otg_hcd_urb_enqueue(dwc_otg_hcd, dwc_otg_urb,
+ /*(dwc_otg_qh_t **)*/
+ ref_ep_hcpriv,
+ mem_flags == GFP_ATOMIC ? 1 : 0);
+ if (0 == retval) {
+ if (alloc_bandwidth) {
+ allocate_bus_bandwidth(hcd,
+ dwc_otg_hcd_get_ep_bandwidth(
+ dwc_otg_hcd, *ref_ep_hcpriv),
+ urb);
+ }
+ } else {
#if USB_URB_EP_LINKING
- dwc_irqflags_t irqflags;
- DWC_DEBUGPL(DBG_HCD, "DWC OTG dwc_otg_hcd_urb_enqueue failed rc %d\n", retval);
- DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
- usb_hcd_unlink_urb_from_ep(hcd, urb);
- DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
+ dwc_irqflags_t irqflags;
+ DWC_DEBUGPL(DBG_HCD, "DWC OTG dwc_otg_hcd_urb_enqueue failed rc %d\n", retval);
+ DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags);
+ usb_hcd_unlink_urb_from_ep(hcd, urb);
+ DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags);
#endif
- if (retval == -DWC_E_NO_DEVICE) {
- retval = -ENODEV;
- }
- }
- }
+ if (retval == -DWC_E_NO_DEVICE)
+ retval = -ENODEV;
+ }
+ }
return retval;
}
--
1.9.1