mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] drivers gpio: Check for negativ gpio values
@ 2012-09-24  8:59 Teresa Gámez
  2012-09-24  8:59 ` [PATCH 2/2] ARM OMAP: switch to gpiolib support Teresa Gámez
  2012-09-24  9:16 ` [PATCH 1/2] drivers gpio: Check for negativ gpio values Jan Lübbe
  0 siblings, 2 replies; 6+ messages in thread
From: Teresa Gámez @ 2012-09-24  8:59 UTC (permalink / raw)
  To: barebox


Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
---
 drivers/gpio/gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpio/gpio.c b/drivers/gpio/gpio.c
index 6ad8d27..0966e2a 100644
--- a/drivers/gpio/gpio.c
+++ b/drivers/gpio/gpio.c
@@ -10,7 +10,7 @@ static struct gpio_chip *gpio_desc[ARCH_NR_GPIOS];
 
 static int gpio_is_valid(unsigned gpio)
 {
-	if (gpio < ARCH_NR_GPIOS)
+	if (gpio < ARCH_NR_GPIOS && gpio >= 0)
 		return 1;
 	return 0;
 }
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-24 19:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-24  8:59 [PATCH 1/2] drivers gpio: Check for negativ gpio values Teresa Gámez
2012-09-24  8:59 ` [PATCH 2/2] ARM OMAP: switch to gpiolib support Teresa Gámez
2012-09-24 19:30   ` Sascha Hauer
2012-09-24  9:16 ` [PATCH 1/2] drivers gpio: Check for negativ gpio values Jan Lübbe
2012-09-24  9:21   ` Teresa Gamez
2012-09-24  9:34   ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox