diff options
author | 2017-07-20 18:00:57 +0200 | |
---|---|---|
committer | 2017-08-14 15:01:13 +0200 | |
commit | 9c07409c34ddf1804721cee21ca835733e165bde (patch) | |
tree | 9004ca0ee9ea2cf5058fc6d8cd8737b11ffc57e2 /drivers/gpio | |
parent | gpio: tegra: Use platform_irq_count() (diff) | |
download | linux-9c07409c34ddf1804721cee21ca835733e165bde.tar.gz linux-9c07409c34ddf1804721cee21ca835733e165bde.tar.bz2 linux-9c07409c34ddf1804721cee21ca835733e165bde.zip |
gpio: tegra: Use platform_get_irq()
Instead of using platform_get_resource() and getting the interrupts from
the resource, use platform_get_irq() which is slightly easier to use and
covers some special cases that the former doesn't.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-tegra.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index b8de130d2ecd..755d3b61fbb7 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -641,15 +641,15 @@ static int tegra_gpio_probe(struct platform_device *pdev) return -ENODEV; for (i = 0; i < tgi->bank_count; i++) { - res = platform_get_resource(pdev, IORESOURCE_IRQ, i); - if (!res) { - dev_err(&pdev->dev, "Missing IRQ resource\n"); - return -ENODEV; + ret = platform_get_irq(pdev, i); + if (ret < 0) { + dev_err(&pdev->dev, "Missing IRQ resource: %d\n", ret); + return ret; } bank = &tgi->bank_info[i]; bank->bank = i; - bank->irq = res->start; + bank->irq = ret; bank->tgi = tgi; } |