diff options
Diffstat (limited to 'drivers/gpio/gpio-tegra.c')
-rw-r--r-- | drivers/gpio/gpio-tegra.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index d982593d7563..c7c175a4aff1 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c | |||
@@ -380,7 +380,6 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev) | |||
380 | { | 380 | { |
381 | const struct of_device_id *match; | 381 | const struct of_device_id *match; |
382 | struct tegra_gpio_soc_config *config; | 382 | struct tegra_gpio_soc_config *config; |
383 | int irq_base; | ||
384 | struct resource *res; | 383 | struct resource *res; |
385 | struct tegra_gpio_bank *bank; | 384 | struct tegra_gpio_bank *bank; |
386 | int gpio; | 385 | int gpio; |
@@ -417,14 +416,11 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev) | |||
417 | return -ENODEV; | 416 | return -ENODEV; |
418 | } | 417 | } |
419 | 418 | ||
420 | irq_base = irq_alloc_descs(-1, 0, tegra_gpio_chip.ngpio, 0); | 419 | irq_domain = irq_domain_add_linear(pdev->dev.of_node, |
421 | if (irq_base < 0) { | 420 | tegra_gpio_chip.ngpio, |
422 | dev_err(&pdev->dev, "Couldn't allocate IRQ numbers\n"); | ||
423 | return -ENODEV; | ||
424 | } | ||
425 | irq_domain = irq_domain_add_legacy(pdev->dev.of_node, | ||
426 | tegra_gpio_chip.ngpio, irq_base, 0, | ||
427 | &irq_domain_simple_ops, NULL); | 421 | &irq_domain_simple_ops, NULL); |
422 | if (!irq_domain) | ||
423 | return -ENODEV; | ||
428 | 424 | ||
429 | for (i = 0; i < tegra_gpio_bank_count; i++) { | 425 | for (i = 0; i < tegra_gpio_bank_count; i++) { |
430 | res = platform_get_resource(pdev, IORESOURCE_IRQ, i); | 426 | res = platform_get_resource(pdev, IORESOURCE_IRQ, i); |
@@ -464,7 +460,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev) | |||
464 | gpiochip_add(&tegra_gpio_chip); | 460 | gpiochip_add(&tegra_gpio_chip); |
465 | 461 | ||
466 | for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) { | 462 | for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) { |
467 | int irq = irq_find_mapping(irq_domain, gpio); | 463 | int irq = irq_create_mapping(irq_domain, gpio); |
468 | /* No validity check; all Tegra GPIOs are valid IRQs */ | 464 | /* No validity check; all Tegra GPIOs are valid IRQs */ |
469 | 465 | ||
470 | bank = &tegra_gpio_banks[GPIO_BANK(gpio)]; | 466 | bank = &tegra_gpio_banks[GPIO_BANK(gpio)]; |