summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/gadget.c
diff options
context:
space:
mode:
authorJohn Youn <John.Youn@synopsys.com>2017-01-17 20:31:43 -0800
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-01-24 11:04:19 +0200
commit34c0887fde3489b10fb712ab0312ca735fc85dd4 (patch)
treeeff51c1708e9760ba6f0528452684bd25f55fc01 /drivers/usb/dwc2/gadget.c
parentab2832028f07f19da9587310d3a6978dc4a34d61 (diff)
downloadlinux-34c0887fde3489b10fb712ab0312ca735fc85dd4.tar.bz2
usb: dwc2: Fix brace usage
* Remove braces for one-line statements * Add missing braces where another arm in if-statement uses braces Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/gadget.c')
-rw-r--r--drivers/usb/dwc2/gadget.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index ca6313101354..3190ffc43980 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -1644,9 +1644,8 @@ static int dwc2_hsotg_process_req_feature(struct dwc2_hsotg *hsotg,
}
/* If we have pending request, then start it */
- if (!ep->req) {
+ if (!ep->req)
dwc2_gadget_start_next_request(ep);
- }
}
break;
@@ -1938,9 +1937,8 @@ static void dwc2_hsotg_complete_request(struct dwc2_hsotg *hsotg,
* so be careful when doing this.
*/
- if (!hs_ep->req && result >= 0) {
+ if (!hs_ep->req && result >= 0)
dwc2_gadget_start_next_request(hs_ep);
- }
}
/*
@@ -4051,9 +4049,9 @@ static int dwc2_hsotg_ep_sethalt(struct usb_ep *ep, int value, bool now)
epreg = DOEPCTL(index);
epctl = dwc2_readl(hs->regs + epreg);
- if (value)
+ if (value) {
epctl |= DXEPCTL_STALL;
- else {
+ } else {
epctl &= ~DXEPCTL_STALL;
xfertype = epctl & DXEPCTL_EPTYPE_MASK;
if (xfertype == DXEPCTL_EPTYPE_BULK ||