diff mbox

[5/5] OMAP: Zoom2: Release Dbg board detect gpio

Message ID FCCFB4CDC6E5564B9182F639FC35608702F9A44DB9@dbde02.ent.ti.com (mailing list archive)
State Accepted, archived
Delegated to: Tony Lindgren
Headers show

Commit Message

vikram pandita Aug. 27, 2009, 11:20 p.m. UTC
Kevin
Could you please line this trivial fix for Zoom2, just like you lined up the 
[PATCH 4/5] OMAP: Zoom2: Fix serial break

That way my DEBUG_LL series will just be related to DEBUG_LL and nothing more on zoom2 fixes.

-----Original Message-----
From: Pandita, Vikram 
Sent: Friday, August 21, 2009 1:11 PM
To: linux-omap@vger.kernel.org; linux-arm-kernel@lists.arm.linux.org.uk
Cc: Pandita, Vikram
Subject: [PATCH 5/5] OMAP: Zoom2: Release Dbg board detect gpio

Release the Dbg board detection gpio once its purpose is served

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
---
 arch/arm/mach-omap2/board-zoom-debugboard.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 4dd714d..d80e448 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -130,6 +130,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;
 
@@ -141,10 +142,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 = {