Thread (19 messages) 19 messages, 3 authors, 2012-04-02
STALE5216d REVIEWED: 1 (0M)
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 07/12] USB: ohci-at91: coding style modifications with one-line ifs

From: Nicolas Ferre <hidden>
Date: 2012-03-29 13:29:11
Also in: lkml
Subsystem: the rest, usb ohci driver, usb subsystem · Maintainers: Linus Torvalds, Alan Stern, Greg Kroah-Hartman

Signed-off-by: Nicolas Ferre <redacted>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <redacted>
---
 drivers/usb/host/ohci-at91.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index cf9707d..dd58b555 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -327,9 +327,8 @@ static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
 			dev_dbg(hcd->self.controller,
 				"ClearPortFeature: OVER_CURRENT\n");
 
-			if (wIndex && wIndex <= ARRAY_SIZE(pdata->vbus_pin)) {
+			if (wIndex && wIndex <= ARRAY_SIZE(pdata->vbus_pin))
 				pdata->overcurrent_status[wIndex-1] = 0;
-			}
 
 			goto out;
 
@@ -382,17 +381,14 @@ static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
 		dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex);
 
 		if (wIndex && wIndex <= ARRAY_SIZE(pdata->vbus_pin)) {
-			if (! ohci_at91_usb_get_power(pdata, wIndex-1)) {
+			if (! ohci_at91_usb_get_power(pdata, wIndex-1))
 				*data &= ~cpu_to_le32(RH_PS_PPS);
-			}
 
-			if (pdata->overcurrent_changed[wIndex-1]) {
+			if (pdata->overcurrent_changed[wIndex-1])
 				*data |= cpu_to_le32(RH_PS_OCIC);
-			}
 
-			if (pdata->overcurrent_status[wIndex-1]) {
+			if (pdata->overcurrent_status[wIndex-1])
 				*data |= cpu_to_le32(RH_PS_POCI);
-			}
 		}
 	}
 
-- 
1.7.9.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help