diff mbox

free rev gpios when they are read, so others can read them later

Message ID 2DCF0893-4166-4604-887B-EDBC3643290A@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tasslehoff Kjappfot May 26, 2011, 7:59 p.m. 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 <tasskjapp@gmail.com>
---
arch/arm/mach-omap2/board-omap3beagle.c |    3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Igor Grinberg May 27, 2011, 11:28 a.m. UTC | #1
Hi Tasslehoff,

On 05/26/11 22:59, Tasslehoff Kjappfot wrote:
> 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 <tasskjapp@gmail.com>
> ---
> 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));
> +

To be consistent with the rest of the file,
can the white space here be "tabs" instead of spaces?
diff mbox

Patch

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");