diff options
author | Robert Deliën <Robert@delien.nl> | 2011-11-22 04:14:22 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2011-12-06 23:59:40 +0100 |
commit | 5a42cd33d5600e90245fe4fa979d888753b081de (patch) | |
tree | dc80223730b251487cde8a58332c51c0e8ca31f2 /drivers/gpio/mxs_gpio.c | |
parent | aa72e43bb77353f8f33f4f5c7484a48084495e50 (diff) | |
download | u-boot-imx-5a42cd33d5600e90245fe4fa979d888753b081de.zip u-boot-imx-5a42cd33d5600e90245fe4fa979d888753b081de.tar.gz u-boot-imx-5a42cd33d5600e90245fe4fa979d888753b081de.tar.bz2 |
M28: Fix OB1 bug in GPIO driver
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 at delien.nl>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Diffstat (limited to 'drivers/gpio/mxs_gpio.c')
-rw-r--r-- | drivers/gpio/mxs_gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |