aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-tegra.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-02-13 18:21:15 -0500
committerOlof Johansson <olof@lixom.net>2012-02-26 16:21:18 -0500
commitbdc93a77da75ee421125896ce4bbd91afff63809 (patch)
tree8b55ee08e35ae6acb341e97bd62eff00192f2dbb /drivers/gpio/gpio-tegra.c
parent129cee1020d8031df1e3986673c64ca9eb7a2617 (diff)
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>
Diffstat (limited to 'drivers/gpio/gpio-tegra.c')
-rw-r--r--drivers/gpio/gpio-tegra.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 98f3980dab7c..6f17671260e1 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -75,7 +75,7 @@ struct tegra_gpio_bank {
75#endif 75#endif
76}; 76};
77 77
78static struct irq_domain irq_domain; 78static struct irq_domain *irq_domain;
79static void __iomem *regs; 79static void __iomem *regs;
80static u32 tegra_gpio_bank_count; 80static u32 tegra_gpio_bank_count;
81static struct tegra_gpio_bank *tegra_gpio_banks; 81static struct tegra_gpio_bank *tegra_gpio_banks;
@@ -141,7 +141,7 @@ static int tegra_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
141 141
142static int tegra_gpio_to_irq(struct gpio_chip *chip, unsigned offset) 142static int tegra_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
143{ 143{
144 return irq_domain_to_irq(&irq_domain, offset); 144 return irq_find_mapping(irq_domain, offset);
145} 145}
146 146
147static struct gpio_chip tegra_gpio_chip = { 147static struct gpio_chip tegra_gpio_chip = {
@@ -372,11 +372,9 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
372 dev_err(&pdev->dev, "Couldn't allocate IRQ numbers\n"); 372 dev_err(&pdev->dev, "Couldn't allocate IRQ numbers\n");
373 return -ENODEV; 373 return -ENODEV;
374 } 374 }
375 irq_domain.irq_base = irq_base; 375 irq_domain = irq_domain_add_legacy(pdev->dev.of_node,
376 irq_domain.nr_irq = tegra_gpio_chip.ngpio; 376 tegra_gpio_chip.ngpio, irq_base, 0,
377 irq_domain.ops = &irq_domain_simple_ops; 377 &irq_domain_simple_ops, NULL);
378 irq_domain.of_node = pdev->dev.of_node;
379 irq_domain_add(&irq_domain);
380 378
381 for (i = 0; i < tegra_gpio_bank_count; i++) { 379 for (i = 0; i < tegra_gpio_bank_count; i++) {
382 res = platform_get_resource(pdev, IORESOURCE_IRQ, i); 380 res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
@@ -416,7 +414,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
416 gpiochip_add(&tegra_gpio_chip); 414 gpiochip_add(&tegra_gpio_chip);
417 415
418 for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) { 416 for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) {
419 int irq = irq_domain_to_irq(&irq_domain, gpio); 417 int irq = irq_find_mapping(irq_domain, gpio);
420 /* No validity check; all Tegra GPIOs are valid IRQs */ 418 /* No validity check; all Tegra GPIOs are valid IRQs */
421 419
422 bank = &tegra_gpio_banks[GPIO_BANK(gpio)]; 420 bank = &tegra_gpio_banks[GPIO_BANK(gpio)];