diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-08-22 19:39:55 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-08-24 03:28:37 -0400 |
commit | 470080015c1f8bbd15ba1486d5c4bd8a3e7fa79a (patch) | |
tree | 7136eb6568c99832a0eff9da231257b88c5d381b /drivers/gpio/gpio-tegra.c | |
parent | a1e6b41e8ec152efceb3128592b83d40c8a28334 (diff) |
ARM: 7052/1: gpio/tegra: Remove use of irq_to_gpio
irq_to_gpio is being removed. Replace the only use of that API by
the ARM Tegra sub-architecture.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/gpio/gpio-tegra.c')
-rw-r--r-- | drivers/gpio/gpio-tegra.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 747eb40e8afe..ecade29d79e8 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c | |||
@@ -331,6 +331,7 @@ static struct lock_class_key gpio_lock_class; | |||
331 | static int __init tegra_gpio_init(void) | 331 | static int __init tegra_gpio_init(void) |
332 | { | 332 | { |
333 | struct tegra_gpio_bank *bank; | 333 | struct tegra_gpio_bank *bank; |
334 | int gpio; | ||
334 | int i; | 335 | int i; |
335 | int j; | 336 | int j; |
336 | 337 | ||
@@ -352,14 +353,17 @@ static int __init tegra_gpio_init(void) | |||
352 | 353 | ||
353 | gpiochip_add(&tegra_gpio_chip); | 354 | gpiochip_add(&tegra_gpio_chip); |
354 | 355 | ||
355 | for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) { | 356 | for (gpio = 0; gpio < TEGRA_NR_GPIOS; gpio++) { |
356 | bank = &tegra_gpio_banks[GPIO_BANK(irq_to_gpio(i))]; | 357 | int irq = TEGRA_GPIO_TO_IRQ(gpio); |
358 | /* No validity check; all Tegra GPIOs are valid IRQs */ | ||
357 | 359 | ||
358 | irq_set_lockdep_class(i, &gpio_lock_class); | 360 | bank = &tegra_gpio_banks[GPIO_BANK(gpio)]; |
359 | irq_set_chip_data(i, bank); | 361 | |
360 | irq_set_chip_and_handler(i, &tegra_gpio_irq_chip, | 362 | irq_set_lockdep_class(irq, &gpio_lock_class); |
363 | irq_set_chip_data(irq, bank); | ||
364 | irq_set_chip_and_handler(irq, &tegra_gpio_irq_chip, | ||
361 | handle_simple_irq); | 365 | handle_simple_irq); |
362 | set_irq_flags(i, IRQF_VALID); | 366 | set_irq_flags(irq, IRQF_VALID); |
363 | } | 367 | } |
364 | 368 | ||
365 | for (i = 0; i < ARRAY_SIZE(tegra_gpio_banks); i++) { | 369 | for (i = 0; i < ARRAY_SIZE(tegra_gpio_banks); i++) { |