aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2014-02-22 07:01:35 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-28 19:36:45 -0500
commit45af780a0fcac8fbba0ac740a671b2af80bcf189 (patch)
tree41c6cc4b1c829085a164d9e4c10471a1ea9f5698 /arch
parent436e4ab5fc85d3d198c292ff46ceb2fb142a39d1 (diff)
serial: imx: Remove init() and exit() platform callbacks
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/mach-mx31moboard.c21
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 b3738e616f19..8f45afe785f8 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 = {
128 .num_resources = 1, 128 .num_resources = 1,
129}; 129};
130 130
131static int moboard_uart0_init(struct platform_device *pdev) 131static void __init moboard_uart0_init(void)
132{ 132{
133 int ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack"); 133 if (!gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack")) {
134 if (ret) 134 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0);
135 return ret;
136
137 ret = gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0);
138 if (ret)
139 gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1)); 135 gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1));
140 136 }
141 return ret;
142}
143
144static void moboard_uart0_exit(struct platform_device *pdev)
145{
146 gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1));
147} 137}
148 138
149static const struct imxuart_platform_data uart0_pdata __initconst = { 139static const struct imxuart_platform_data uart0_pdata __initconst = {
150 .init = moboard_uart0_init,
151 .exit = moboard_uart0_exit,
152}; 140};
153 141
154static const struct imxuart_platform_data uart4_pdata __initconst = { 142static const struct imxuart_platform_data uart4_pdata __initconst = {
@@ -543,6 +531,7 @@ static void __init mx31moboard_init(void)
543 531
544 imx31_add_imx2_wdt(); 532 imx31_add_imx2_wdt();
545 533
534 moboard_uart0_init();
546 imx31_add_imx_uart0(&uart0_pdata); 535 imx31_add_imx_uart0(&uart0_pdata);
547 imx31_add_imx_uart4(&uart4_pdata); 536 imx31_add_imx_uart4(&uart4_pdata);
548 537