diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-03-16 19:37:24 -0400 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2012-04-04 15:13:18 -0400 |
commit | 4a3398ee9d7d8008ee9bfc8a600b734a1b22af23 (patch) | |
tree | c98b2979ea4e5f9c37e4d0b15860f94c6efeef79 /drivers/gpio | |
parent | 5c1e2c9dc684f26fcc78ff4ef15dc97ed0244303 (diff) |
gpio: tegra: Iterate over the correct number of banks
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.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
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 7d05a345776f..12f349b3830d 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c | |||
@@ -436,7 +436,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev) | |||
436 | return -ENODEV; | 436 | return -ENODEV; |
437 | } | 437 | } |
438 | 438 | ||
439 | for (i = 0; i < 7; i++) { | 439 | for (i = 0; i < tegra_gpio_bank_count; i++) { |
440 | for (j = 0; j < 4; j++) { | 440 | for (j = 0; j < 4; j++) { |
441 | int gpio = tegra_gpio_compose(i, j, 0); | 441 | int gpio = tegra_gpio_compose(i, j, 0); |
442 | tegra_gpio_writel(0x00, GPIO_INT_ENB(gpio)); | 442 | tegra_gpio_writel(0x00, GPIO_INT_ENB(gpio)); |
@@ -514,7 +514,7 @@ static int dbg_gpio_show(struct seq_file *s, void *unused) | |||
514 | int i; | 514 | int i; |
515 | int j; | 515 | int j; |
516 | 516 | ||
517 | for (i = 0; i < 7; i++) { | 517 | for (i = 0; i < tegra_gpio_bank_count; i++) { |
518 | for (j = 0; j < 4; j++) { | 518 | for (j = 0; j < 4; j++) { |
519 | int gpio = tegra_gpio_compose(i, j, 0); | 519 | int gpio = tegra_gpio_compose(i, j, 0); |
520 | seq_printf(s, | 520 | seq_printf(s, |