openwrt/target/linux/brcm2708/patches-3.10/0081-dwc_otg-whitespace-cleanup-in-dwc_otg_urb_enqueue.patch
Florian Fainelli bb39b8d99a brcm2708: update against latest rpi-3.10.y branch
Update our copies of the brcm2708 patches to the latest rpi-3.10-y
rebased against linux-3.10.y stable (3.10.32). This should hopefully
make it easier for us in the future to leverage the raspberry/rpi-*
branches.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 39770
2014-02-28 20:30:08 +00:00

89 lines
3.3 KiB
Diff

From a7ae411621bcf80fcb2f920084183d98adb6213b Mon Sep 17 00:00:00 2001
From: P33M <P33M@github.com>
Date: Thu, 18 Jul 2013 16:32:41 +0100
Subject: [PATCH 081/174] 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(-)
--- 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 us
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 us
}
#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;
}