Skip to contentSkip to conversation

usb: ohci-ep93xx: tidy up ohci_hcd_ep93xx_drv_probe()

PATCH Superseded H Hartley Sweeten 1 participant 1 message Jun 29, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 usb: ohci-ep93xx: tidy up ohci_hcd_ep93xx_drv_probe()

Refactor the function a bit to remove the need for the local variable.

The extern prototype of usb_disabled() is not needed.

Cc Alan Stern <[email protected]>
Cc Lennert Buytenhek <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/usb/host/ohci-ep93xx.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/usb/host/ohci-ep93xx.c +3 -8
index 28fa6b8..bdc2908 100644
@@ -138,17 +138,12 @@ static struct hc_driver ohci_ep93xx_hc_driver = {
 	.start_port_reset	= ohci_start_port_reset,
 };
 
-extern int usb_disabled(void);
-
 static int ohci_hcd_ep93xx_drv_probe(struct platform_device *pdev)
 {
-	int ret;
-
-	ret = -ENODEV;
-	if (!usb_disabled())
-		ret = usb_hcd_ep93xx_probe(&ohci_ep93xx_hc_driver, pdev);
+	if (usb_disabled())
+		return -ENODEV;
 
-	return ret;
+	return usb_hcd_ep93xx_probe(&ohci_ep93xx_hc_driver, pdev);
 }
 
 static int ohci_hcd_ep93xx_drv_remove(struct platform_device *pdev)
Signature · 1 line
1.8.1.4