Commit 47008001 authored by Stephen Warren's avatar Stephen Warren Committed by Russell King

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: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent a1e6b41e
......@@ -331,6 +331,7 @@ static struct lock_class_key gpio_lock_class;
static int __init tegra_gpio_init(void)
{
struct tegra_gpio_bank *bank;
int gpio;
int i;
int j;
......@@ -352,14 +353,17 @@ static int __init tegra_gpio_init(void)
gpiochip_add(&tegra_gpio_chip);
for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
bank = &tegra_gpio_banks[GPIO_BANK(irq_to_gpio(i))];
for (gpio = 0; gpio < TEGRA_NR_GPIOS; gpio++) {
int irq = TEGRA_GPIO_TO_IRQ(gpio);
/* No validity check; all Tegra GPIOs are valid IRQs */
irq_set_lockdep_class(i, &gpio_lock_class);
irq_set_chip_data(i, bank);
irq_set_chip_and_handler(i, &tegra_gpio_irq_chip,
bank = &tegra_gpio_banks[GPIO_BANK(gpio)];
irq_set_lockdep_class(irq, &gpio_lock_class);
irq_set_chip_data(irq, bank);
irq_set_chip_and_handler(irq, &tegra_gpio_irq_chip,
handle_simple_irq);
set_irq_flags(i, IRQF_VALID);
set_irq_flags(irq, IRQF_VALID);
}
for (i = 0; i < ARRAY_SIZE(tegra_gpio_banks); i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment