public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] M28: Fix OB1 bug in GPIO driver
@ 2011-11-22 14:14 Robert Deliën
  2011-11-22 14:21 ` Marek Vasut
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Robert Deliën @ 2011-11-22 14:14 UTC (permalink / raw)
  To: u-boot

This patch fixes a small off-by-one bug in the GPIO driver for the mxs platform that allowed the selection gpio pins of one bank more than the SoC actually has.

Signed-off-by: Robert Deli?n <robert@delien.nl>

diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
index b7e9591..539738b 100644
--- a/drivers/gpio/mxs_gpio.c
+++ b/drivers/gpio/mxs_gpio.c
@@ -120,7 +120,7 @@ int gpio_direction_output(int gp, int value)
 
 int gpio_request(int gp, const char *label)
 {
-       if (PAD_BANK(gp) > PINCTRL_BANKS)
+       if (PAD_BANK(gp) >= PINCTRL_BANKS)
                return -EINVAL;
 
        return 0;

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

end of thread, other threads:[~2011-11-25  8:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 14:14 [U-Boot] [PATCH] M28: Fix OB1 bug in GPIO driver Robert Deliën
2011-11-22 14:21 ` Marek Vasut
2011-11-22 18:14 ` Marek Vasut
     [not found] ` <201111221953.42597.marek.vasut@gmail.com>
     [not found]   ` <0691ADAF-BBB6-4B35-A26B-BDAF622ED9D2@delien.nl>
2011-11-22 22:35     ` Marek Vasut
2011-11-22 22:49 ` Marek Vasut
2011-11-25  8:14 ` Stefano Babic

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