diff options
author | Vikram Pandita <vikram.pandita@ti.com> | 2009-08-21 20:11:20 +0200 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-09-03 00:07:56 +0200 |
commit | 2fcc81a38b699a81e47fdd655cf514c789576554 (patch) | |
tree | 06a503f092a8e03d7ee6b136f0e25b112494a5b9 /arch/arm/mach-omap2/board-zoom-debugboard.c | |
parent | OMAP3: PM: add T2 interrupt line mux setting, and enable on 3430SDP (diff) | |
download | linux-2fcc81a38b699a81e47fdd655cf514c789576554.tar.xz linux-2fcc81a38b699a81e47fdd655cf514c789576554.zip |
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) static inline int omap_zoom2_debugboard_detect(void) { int debug_board_detect = 0; + int ret = 1; debug_board_detect = ZOOM2_SMSC911X_GPIO; @@ -140,10 +141,10 @@ static inline int omap_zoom2_debugboard_detect(void) gpio_direction_input(debug_board_detect); if (!gpio_get_value(debug_board_detect)) { - gpio_free(debug_board_detect); - return 0; + ret = 0; } - return 1; + gpio_free(debug_board_detect); + return ret; } static struct platform_device *zoom2_devices[] __initdata = { |