提交 cda82f85 编写于 作者: V Valentin Longchamp 提交者: Sascha Hauer

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: NValentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
上级 f8594c28
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册