mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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>
This commit is contained in:
parent
564209037d
commit
9c07409c34
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue