[RFC 5/7] USB: Fix usb_add_hcd() checkpatch errors.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sarah Sharp
Date: Thursday, December 30, 2010 - 4:22 pm

The irq enabling code is going to be refactored into a new function, so
clean up some checkpatch errors before moving it.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
---
 drivers/usb/core/hcd.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 6a95017..7bf32c5 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2282,10 +2282,12 @@ int usb_add_hcd(struct usb_hcd *hcd,
 
 		snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
 				hcd->driver->description, hcd->self.busnum);
-		if ((retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
-				hcd->irq_descr, hcd)) != 0) {
+		retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
+				hcd->irq_descr, hcd);
+		if (retval != 0) {
 			dev_err(hcd->self.controller,
-					"request interrupt %d failed\n", irqnum);
+					"request interrupt %d failed\n",
+					irqnum);
 			goto err_request_irq;
 		}
 		hcd->irq = irqnum;
@@ -2302,7 +2304,8 @@ int usb_add_hcd(struct usb_hcd *hcd,
 					(unsigned long long)hcd->rsrc_start);
 	}
 
-	if ((retval = hcd->driver->start(hcd)) < 0) {
+	retval = hcd->driver->start(hcd);
+	if (retval < 0) {
 		dev_err(hcd->self.controller, "startup error %d\n", retval);
 		goto err_hcd_driver_start;
 	}
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC 0/7] Misc USB and xHCI fixes for 2.6.38, Sarah Sharp, (Thu Dec 30, 4:21 pm)
[RFC 2/7] xhci: Remove old no-op test., Sarah Sharp, (Thu Dec 30, 4:22 pm)
[RFC 4/7] USB: Remove bitmap #define from hcd.h, Sarah Sharp, (Thu Dec 30, 4:22 pm)
[RFC 5/7] USB: Fix usb_add_hcd() checkpatch errors., Sarah Sharp, (Thu Dec 30, 4:22 pm)