gpio: tegra: Fix build issue due to irq_domain rework.

Commit 7da5a66 "irq_domain: Remove 'new' irq_domain in favour of the
ppc one" changed the set of available irq domain APIs. Update the Tegra
GPIO driver to account for those changes, to solve a build break.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Stephen Warren 2012-02-13 16:21:15 -07:00 committed by Olof Johansson
parent 129cee1020
commit bdc93a77da

View file

@ -75,7 +75,7 @@ struct tegra_gpio_bank {
#endif #endif
}; };
static struct irq_domain irq_domain; static struct irq_domain *irq_domain;
static void __iomem *regs; static void __iomem *regs;
static u32 tegra_gpio_bank_count; static u32 tegra_gpio_bank_count;
static struct tegra_gpio_bank *tegra_gpio_banks; static struct tegra_gpio_bank *tegra_gpio_banks;
@ -141,7 +141,7 @@ static int tegra_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
static int tegra_gpio_to_irq(struct gpio_chip *chip, unsigned offset) static int tegra_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
{ {
return irq_domain_to_irq(&irq_domain, offset); return irq_find_mapping(irq_domain, offset);
} }
static struct gpio_chip tegra_gpio_chip = { static struct gpio_chip tegra_gpio_chip = {
@ -372,11 +372,9 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "Couldn't allocate IRQ numbers\n"); dev_err(&pdev->dev, "Couldn't allocate IRQ numbers\n");
return -ENODEV; return -ENODEV;
} }
irq_domain.irq_base = irq_base; irq_domain = irq_domain_add_legacy(pdev->dev.of_node,
irq_domain.nr_irq = tegra_gpio_chip.ngpio; tegra_gpio_chip.ngpio, irq_base, 0,
irq_domain.ops = &irq_domain_simple_ops; &irq_domain_simple_ops, NULL);
irq_domain.of_node = pdev->dev.of_node;
irq_domain_add(&irq_domain);
for (i = 0; i < tegra_gpio_bank_count; i++) { for (i = 0; i < tegra_gpio_bank_count; i++) {
res = platform_get_resource(pdev, IORESOURCE_IRQ, i); res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
@ -416,7 +414,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
gpiochip_add(&tegra_gpio_chip); gpiochip_add(&tegra_gpio_chip);
for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) { for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) {
int irq = irq_domain_to_irq(&irq_domain, gpio); int irq = irq_find_mapping(irq_domain, gpio);
/* No validity check; all Tegra GPIOs are valid IRQs */ /* No validity check; all Tegra GPIOs are valid IRQs */
bank = &tegra_gpio_banks[GPIO_BANK(gpio)]; bank = &tegra_gpio_banks[GPIO_BANK(gpio)];