Skip to contentSkip to conversation

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

PATCH In review Tasslehoff Kjappfot 3 participants 4 messages May 26, 2011 – May 31, 2011 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#1 lore raw

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

In reply to a message not in the archive

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.

---
arch/arm/mach-omap2/board-omap3beagle.c | 3 +++

1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +0 -0
index 3ff3a2c..8a4ac43 100644
@@ -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");
Signature · 7 lines
1.7.3.1


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

Hi Tasslehoff,

Quoted 12 lines · Tasslehoff Kjappfot

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.

---
arch/arm/mach-omap2/board-omap3beagle.c | 3 +++

1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +0 -0
index 3ff3a2c..8a4ac43 100644

arch/arm/mach-omap2/board-omap3beagle.c static void __init omap3_beagle_init_rev(void) · line 111

Quoted 6 lines
arch/arm/mach-omap2/board-omap3beagle.c +3 -0
@@ -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?

Signature · 7 lines
Regards,
Igor.

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

Hi Igor.

Quoted 9 lines

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

Signature · 2 lines
Regards,
Igor.

They can. New version attached. I'm don't know how to use git send-email to continue this thread with a comment to my patch, so it was done manually. Let me know if something else is less-than-optimal with my patches. Rookie contributor :)

---
 arch/arm/mach-omap2/board-omap3beagle.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +3 -0
index 3ff3a2c..54dbb7dd 100644
@@ -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");
Signature · 1 line
1.7.3.1
maintainer
#4 lore raw
Quoted 6 lines · Tasslehoff Kjappfot

Hi Igor.

Quoted 5 lines

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

Quoted 6 lines
Quoted 4 lines
Signature · 2 lines
Regards,
Igor.

They can. New version attached. I'm don't know how to use git send-email to continue this thread with a comment to my patch, so it was done manually. Let me know if something else is less-than-optimal with my patches. Rookie contributor :)

Thanks applying to fixes with following description:

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

Regards,

Tony

Quoted 26 lines
---
 arch/arm/mach-omap2/board-omap3beagle.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +3 -0
index 3ff3a2c..54dbb7dd 100644
@@ -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");
Signature · 6 lines
1.7.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html