staging/nvec: Use platform_get_irq()

As opposed to platform_get_resource(), the platform_get_irq() function
has special code to handle driver probe deferral when booting using DT
and where an interrupt provider hasn't been registered yet. While this
is unlikely to become an issue for nvec, platform_get_irq() is the
recommended way to get at interrupts.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Thierry Reding 2014-07-29 13:16:15 +02:00 committed by Greg Kroah-Hartman
parent 47e7b05001
commit b5b628ba49
1 changed files with 2 additions and 3 deletions

View File

@ -821,8 +821,8 @@ static int tegra_nvec_probe(struct platform_device *pdev)
if (IS_ERR(base))
return PTR_ERR(base);
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
nvec->irq = platform_get_irq(pdev, 0);
if (nvec->irq < 0) {
dev_err(&pdev->dev, "no irq resource?\n");
return -ENODEV;
}
@ -840,7 +840,6 @@ static int tegra_nvec_probe(struct platform_device *pdev)
}
nvec->base = base;
nvec->irq = res->start;
nvec->i2c_clk = i2c_clk;
nvec->rx = &nvec->msg_pool[0];