From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Fri, 25 Nov 2011 09:14:40 +0100 Subject: [U-Boot] [PATCH] M28: Fix OB1 bug in GPIO driver In-Reply-To: References: Message-ID: <4ECF4E70.6070007@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 22/11/2011 15:14, Robert Deli?n wrote: > 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 > > 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; > Applied to u-boot-imx, thanks. Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================