diff options
author | guoyin.chen <guoyin.chen@freescale.com> | 2014-04-30 13:36:17 +0800 |
---|---|---|
committer | guoyin.chen <guoyin.chen@freescale.com> | 2014-04-30 13:36:17 +0800 |
commit | e7fdbbc7236c7c884cac0ea1fa14bca3d0990c94 (patch) | |
tree | eab0dc4733ecd4200655ad62f831623da88dd4d7 /arch/arm/mach-imx/mach-mx31moboard.c | |
parent | c4bb6b95be0a385d39fef45d577d5969c077feeb (diff) | |
parent | 8614fc820d62cc2c84eea8d2fdd3157805fdb1c5 (diff) |
Merge remote-tracking branch 'fsl-linux-sdk/imx_3.10.31_1.1.0_alpha' into imx_3.10.y_androidkk4.4.2_2.0.0-alpha
Diffstat (limited to 'arch/arm/mach-imx/mach-mx31moboard.c')
-rw-r--r-- | arch/arm/mach-imx/mach-mx31moboard.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index dae4cd7be040..fb0211617e32 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c @@ -128,27 +128,15 @@ static struct platform_device mx31moboard_flash = { .num_resources = 1, }; -static int moboard_uart0_init(struct platform_device *pdev) +static void __init moboard_uart0_init(void) { - int ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack"); - if (ret) - return ret; - - ret = gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0); - if (ret) + if (!gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack")) { + gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0); gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1)); - - return ret; -} - -static void moboard_uart0_exit(struct platform_device *pdev) -{ - gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1)); + } } static const struct imxuart_platform_data uart0_pdata __initconst = { - .init = moboard_uart0_init, - .exit = moboard_uart0_exit, }; static const struct imxuart_platform_data uart4_pdata __initconst = { @@ -542,6 +530,7 @@ static void __init mx31moboard_init(void) imx31_add_imx2_wdt(); + moboard_uart0_init(); imx31_add_imx_uart0(&uart0_pdata); imx31_add_imx_uart4(&uart4_pdata); |