summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sirf
diff options
context:
space:
mode:
authorBarry Song <Baohua.Song@csr.com>2014-05-25 16:54:23 +0800
committerLinus Walleij <linus.walleij@linaro.org>2014-05-27 15:25:05 +0200
commit648e42e1401542d153090f188d0ef3406a40ac76 (patch)
treea1ac14baceca3735307959e92b6a95505102084b /drivers/pinctrl/sirf
parentde5af04e3ef598759bf67f990c77b71a76e35704 (diff)
downloadlinux-648e42e1401542d153090f188d0ef3406a40ac76.tar.bz2
pinctrl: sirf: fix typo for GPIO bank number
The patch 7420d2d09b12: "pinctrl: sirf: switch driver to use gpiolib irqchip helpers" from Apr 15, 2014, leads to the following static checker warning: drivers/pinctrl/sirf/pinctrl-sirf.c:578 sirfsoc_gpio_handle_irq() warn: buffer overflow 'sgpio_chip.sgpio_bank' 5 <= 31 Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sirf')
-rw-r--r--drivers/pinctrl/sirf/pinctrl-sirf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c
index c03dcc7729eb..a4ea3f739ded 100644
--- a/drivers/pinctrl/sirf/pinctrl-sirf.c
+++ b/drivers/pinctrl/sirf/pinctrl-sirf.c
@@ -574,12 +574,12 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)
struct irq_chip *chip = irq_get_chip(irq);
int i;
- for (i = 0; i < SIRFSOC_GPIO_BANK_SIZE; i++) {
+ for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {
bank = &sgpio_chip.sgpio_bank[i];
if (bank->parent_irq == irq)
break;
}
- BUG_ON (i == SIRFSOC_GPIO_BANK_SIZE);
+ BUG_ON(i == SIRFSOC_GPIO_NO_OF_BANKS);
chained_irq_enter(chip, desc);