diff options
| author | Stephen Warren <swarren@nvidia.com> | 2012-03-16 17:37:24 -0600 |
|---|---|---|
| committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-06-06 05:48:24 -0700 |
| commit | eb18156f62a6039dab506985f7c5d1752dcd3a10 (patch) | |
| tree | b89a6e84b50b01d79af45e9cabc773255fd757ac /drivers/gpio | |
| parent | b175e51c671cf9418fdef87077bc876228320dbd (diff) | |
fixup: gpio: tegra: Iterate over the correct number of banks
[DW: Missed in the 3.4 merge]
When Tegra30 support was added to the Tegra GPIO driver, a few places
which iterated over all banks were not converted to use the variable
tegra_gpio_bank_count rather than hard-coding the bank count. Fix this.
Change-Id: Ic9a8ad150ba4d029456f00a80ab4b2c619029a6a
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/106366
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'drivers/gpio')
| -rw-r--r-- | drivers/gpio/gpio-tegra.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index e55c93d0674d..8db4ce1215cf 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -540,7 +540,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev) return -ENODEV; } - for (i = 0; i < ARRAY_SIZE(tegra_gpio_banks); i++) { + for (i = 0; i < tegra_gpio_bank_count; i++) { for (j = 0; j < 4; j++) { int gpio = tegra_gpio_compose(i, j, 0); tegra_gpio_writel(0x00, GPIO_INT_ENB(gpio)); @@ -621,7 +621,7 @@ static int dbg_gpio_show(struct seq_file *s, void *unused) int j; seq_printf(s, "Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL\n"); - for (i = 0; i < ARRAY_SIZE(tegra_gpio_banks); i++) { + for (i = 0; i < tegra_gpio_bank_count; i++) { for (j = 0; j < 4; j++) { int gpio = tegra_gpio_compose(i, j, 0); seq_printf(s, |
