diff options
author | Vikram Pandita <vikram.pandita@ti.com> | 2009-08-21 14:11:20 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-09-02 18:07:56 -0400 |
commit | 2fcc81a38b699a81e47fdd655cf514c789576554 (patch) | |
tree | 06a503f092a8e03d7ee6b136f0e25b112494a5b9 /arch/arm/mach-omap2/board-zoom-debugboard.c | |
parent | 5110b2980a1299f6c253260de385b0dc2b2308b0 (diff) |
OMAP: Zoom2: release debug board detect gpio line
Release the Dbg board detection gpio once its purpose is served
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-debugboard.c')
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-debugboard.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c index e0948c922988..1f13e2a1f322 100644 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ b/arch/arm/mach-omap2/board-zoom-debugboard.c | |||
@@ -129,6 +129,7 @@ static inline void __init zoom2_init_quaduart(void) | |||
129 | static inline int omap_zoom2_debugboard_detect(void) | 129 | static inline int omap_zoom2_debugboard_detect(void) |
130 | { | 130 | { |
131 | int debug_board_detect = 0; | 131 | int debug_board_detect = 0; |
132 | int ret = 1; | ||
132 | 133 | ||
133 | debug_board_detect = ZOOM2_SMSC911X_GPIO; | 134 | debug_board_detect = ZOOM2_SMSC911X_GPIO; |
134 | 135 | ||
@@ -140,10 +141,10 @@ static inline int omap_zoom2_debugboard_detect(void) | |||
140 | gpio_direction_input(debug_board_detect); | 141 | gpio_direction_input(debug_board_detect); |
141 | 142 | ||
142 | if (!gpio_get_value(debug_board_detect)) { | 143 | if (!gpio_get_value(debug_board_detect)) { |
143 | gpio_free(debug_board_detect); | 144 | ret = 0; |
144 | return 0; | ||
145 | } | 145 | } |
146 | return 1; | 146 | gpio_free(debug_board_detect); |
147 | return ret; | ||
147 | } | 148 | } |
148 | 149 | ||
149 | static struct platform_device *zoom2_devices[] __initdata = { | 150 | static struct platform_device *zoom2_devices[] __initdata = { |