summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx3
diff options
context:
space:
mode:
authorValentin Longchamp <valentin.longchamp@epfl.ch>2010-02-09 18:13:35 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2010-02-10 11:11:56 +0100
commitcda82f85c2bba92daa3d017f7c7bc5f8c61a2e11 (patch)
tree056b56d6f9a42a461d39479f18a033d5220a2b2f /arch/arm/mach-mx3
parentf8594c283e409024d817e75027074570ce27dcc5 (diff)
downloadlwn-cda82f85c2bba92daa3d017f7c7bc5f8c61a2e11.tar.gz
lwn-cda82f85c2bba92daa3d017f7c7bc5f8c61a2e11.zip
mx31moboard: make usbh2 enable gpio claim more atomic
It is more cosmetic than fixing a real problem, but the code looks more logical like that Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r--arch/arm/mach-mx3/mach-mx31moboard.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c
index fe18cd513cd7..c357a72ee406 100644
--- a/arch/arm/mach-mx3/mach-mx31moboard.c
+++ b/arch/arm/mach-mx3/mach-mx31moboard.c
@@ -352,9 +352,7 @@ static struct fsl_usb2_platform_data usb_pdata = {
static int moboard_usbh2_hw_init(struct platform_device *pdev)
{
- int ret = gpio_request(USBH2_EN_B, "usbh2-en");
- if (ret)
- return ret;
+ int ret;
mxc_iomux_set_gpr(MUX_PGP_UH2, true);
@@ -371,6 +369,9 @@ static int moboard_usbh2_hw_init(struct platform_device *pdev)
mxc_iomux_set_pad(MX31_PIN_SRXD3, USB_PAD_CFG);
mxc_iomux_set_pad(MX31_PIN_STXD3, USB_PAD_CFG);
+ ret = gpio_request(USBH2_EN_B, "usbh2-en");
+ if (ret)
+ return ret;
gpio_direction_output(USBH2_EN_B, 0);
return 0;