From patchwork Thu May 26 19:59:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tasslehoff Kjappfot X-Patchwork-Id: 822062 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4QK1bdO024371 for ; Thu, 26 May 2011 20:01:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933103Ab1EZUAD (ORCPT ); Thu, 26 May 2011 16:00:03 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:63515 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933056Ab1EZT74 convert rfc822-to-8bit (ORCPT ); Thu, 26 May 2011 15:59:56 -0400 Received: by ewy4 with SMTP id 4so385822ewy.19 for ; Thu, 26 May 2011 12:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:content-type:content-transfer-encoding :subject:date:references:to:message-id:mime-version:x-mailer; bh=0gF/C9oQ6oL8OCwibFwO3mVyTbhdIc8yGJCZfUakyWQ=; b=JpqUWzhYOsE16FkuAdxlCvPpjKJ0SuYJho4B0Rnw/VtZeWmMjvd+D3mXpcDlhxLrQ6 FsnyccI18vlOqsGitMSDCkWg0wyhO/Z5pWz+HattoVJJ6eCeWnDYq+9b4Ai1rLVrZCSu cte4/vvDLvMiCGkz8nJdxjjsoMFpjrYO5niro= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:references :to:message-id:mime-version:x-mailer; b=q79k1Arc5ZpuSfm7+udCLO5IBnJF6ND/Y8raA4iTqmyttPYl1oR/R2zB2yqidZfvV4 sbhma5ktOh6PTNduAgWJnCqCg0LhW6gLPeHL1UzRe5BwFa+00AmpqLLTp5qPtjIA9Kpk CsYO0ooIrX5z5kMNdRvNUp6AR3PSxI2TmIwjQ= Received: by 10.213.96.17 with SMTP id f17mr516599ebn.49.1306439995284; Thu, 26 May 2011 12:59:55 -0700 (PDT) Received: from [192.168.10.120] (145.79-161-31.customer.lyse.net [79.161.31.145]) by mx.google.com with ESMTPS id s48sm731296eeb.16.2011.05.26.12.59.54 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2011 12:59:54 -0700 (PDT) From: Tasslehoff Kjappfot Subject: [PATCH] free rev gpios when they are read, so others can read them later Date: Thu, 26 May 2011 21:59:53 +0200 References: <1306438716-68265-1-git-send-email-tasskjapp@gmail.com> To: linux-omap@vger.kernel.org Message-Id: <2DCF0893-4166-4604-887B-EDBC3643290A@gmail.com> Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 26 May 2011 20:01:37 +0000 (UTC) A script of mine that reads the rev gpios on the beagleboard started failing when I upgraded to .37, since board-omap3beagle.c doesn´t free the rev gpios after using them. Signed-off-by: Tasslehoff Kjappfot --- arch/arm/mach-omap2/board-omap3beagle.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 3ff3a2c..8a4ac43 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -106,6 +106,9 @@ static void __init omap3_beagle_init_rev(void) beagle_rev = gpio_get_value(171) | (gpio_get_value(172) << 1) | (gpio_get_value(173) << 2); + gpio_free_array(omap3_beagle_rev_gpios, + ARRAY_SIZE(omap3_beagle_rev_gpios)); + switch (beagle_rev) { case 7: printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n");