Skip to content

Commit b5b628b

Browse files
thierryredinggregkh
authored andcommitted
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>
1 parent 47e7b05 commit b5b628b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/staging/nvec/nvec.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,8 @@ static int tegra_nvec_probe(struct platform_device *pdev)
821821
if (IS_ERR(base))
822822
return PTR_ERR(base);
823823

824-
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
825-
if (!res) {
824+
nvec->irq = platform_get_irq(pdev, 0);
825+
if (nvec->irq < 0) {
826826
dev_err(&pdev->dev, "no irq resource?\n");
827827
return -ENODEV;
828828
}
@@ -840,7 +840,6 @@ static int tegra_nvec_probe(struct platform_device *pdev)
840840
}
841841

842842
nvec->base = base;
843-
nvec->irq = res->start;
844843
nvec->i2c_clk = i2c_clk;
845844
nvec->rx = &nvec->msg_pool[0];
846845

0 commit comments

Comments
 (0)