From patchwork Fri Aug 28 08:28:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 44414 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 n7S8SsXA011705 for ; Fri, 28 Aug 2009 08:28:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752338AbZH1I2z (ORCPT ); Fri, 28 Aug 2009 04:28:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752406AbZH1I2z (ORCPT ); Fri, 28 Aug 2009 04:28:55 -0400 Received: from mail-bw0-f219.google.com ([209.85.218.219]:62772 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752338AbZH1I2y (ORCPT ); Fri, 28 Aug 2009 04:28:54 -0400 Received: by mail-bw0-f219.google.com with SMTP id 19so1464180bwz.37 for ; Fri, 28 Aug 2009 01:28:56 -0700 (PDT) Received: by 10.103.76.37 with SMTP id d37mr127051mul.99.1251448136255; Fri, 28 Aug 2009 01:28:56 -0700 (PDT) Received: from localhost (a88-115-11-210.elisa-laajakaista.fi [88.115.11.210]) by mx.google.com with ESMTPS id j10sm3634704muh.26.2009.08.28.01.28.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 28 Aug 2009 01:28:55 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Vikram Pandita Subject: [PATCH 2/2] OMAP: Zoom2: release debug board detect gpio line Date: Fri, 28 Aug 2009 11:28:47 +0300 Message-Id: <1251448127-27336-3-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.6.4 In-Reply-To: <1251448127-27336-2-git-send-email-khilman@deeprootsystems.com> References: <1251448127-27336-1-git-send-email-khilman@deeprootsystems.com> <1251448127-27336-2-git-send-email-khilman@deeprootsystems.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Vikram Pandita Release the Dbg board detection gpio once its purpose is served Signed-off-by: Vikram Pandita Signed-off-by: Kevin Hilman --- 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 e0948c9..1f13e2a 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 = {