diff options
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/mach-mx31moboard.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c index 95633bb063bf..67776bc61c33 100644 --- a/arch/arm/mach-mx3/mach-mx31moboard.c +++ b/arch/arm/mach-mx3/mach-mx31moboard.c | |||
@@ -125,13 +125,25 @@ static struct platform_device mx31moboard_flash = { | |||
125 | 125 | ||
126 | static int moboard_uart0_init(struct platform_device *pdev) | 126 | static int moboard_uart0_init(struct platform_device *pdev) |
127 | { | 127 | { |
128 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack"); | 128 | int ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack"); |
129 | gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0); | 129 | if (ret) |
130 | return 0; | 130 | return ret; |
131 | |||
132 | ret = gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0); | ||
133 | if (ret) | ||
134 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1)); | ||
135 | |||
136 | return ret; | ||
137 | } | ||
138 | |||
139 | static void moboard_uart0_exit(struct platform_device *pdev) | ||
140 | { | ||
141 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1)); | ||
131 | } | 142 | } |
132 | 143 | ||
133 | static const struct imxuart_platform_data uart0_pdata __initconst = { | 144 | static const struct imxuart_platform_data uart0_pdata __initconst = { |
134 | .init = moboard_uart0_init, | 145 | .init = moboard_uart0_init, |
146 | .exit = moboard_uart0_exit, | ||
135 | }; | 147 | }; |
136 | 148 | ||
137 | static const struct imxuart_platform_data uart4_pdata __initconst = { | 149 | static const struct imxuart_platform_data uart4_pdata __initconst = { |