From patchwork Fri Aug 21 18:11:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vikram pandita X-Patchwork-Id: 43177 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7LICOsi015537 for ; Fri, 21 Aug 2009 18:12:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755441AbZHUSLz (ORCPT ); Fri, 21 Aug 2009 14:11:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753834AbZHUSLz (ORCPT ); Fri, 21 Aug 2009 14:11:55 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:43989 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755441AbZHUSLy (ORCPT ); Fri, 21 Aug 2009 14:11:54 -0400 Received: from dlep35.itg.ti.com ([157.170.170.118]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id n7LIBcMX027786; Fri, 21 Aug 2009 13:11:44 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id n7LIBacq003032; Fri, 21 Aug 2009 13:11:36 -0500 (CDT) Received: from vip-tid (lta0307903-128247075087.am.dhcp.ti.com [128.247.75.87]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id n7LIBaZ08216; Fri, 21 Aug 2009 13:11:36 -0500 (CDT) Received: from vip-tid (localhost.localdomain [127.0.0.1]) by vip-tid (Postfix) with ESMTP id 9EA5329CCF2; Fri, 21 Aug 2009 13:11:21 -0500 (CDT) Received: (from vikram@localhost) by vip-tid (8.14.3/8.14.3/Submit) id n7LIBLRL010702; Fri, 21 Aug 2009 13:11:21 -0500 X-Authentication-Warning: vip-tid: vikram set sender to vikram.pandita@ti.com using -f From: Vikram Pandita To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.arm.linux.org.uk Cc: Vikram Pandita Subject: [PATCH 5/5] OMAP: Zoom2: Release Dbg board detect gpio Date: Fri, 21 Aug 2009 13:11:20 -0500 Message-Id: <1250878280-10667-1-git-send-email-vikram.pandita@ti.com> X-Mailer: git-send-email 1.6.3.3.334.g916e1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Release the Dbg board detection gpio once its purpose is served Signed-off-by: Vikram Pandita --- 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 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 = {