diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-15 17:51:20 +0000 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2019-12-18 14:55:11 +0100 |
commit | 67d7d920b3f0dc72651945ba6256e7777a5fe4d1 (patch) | |
tree | 2f9fa318feceb67a01bbc7c23daa722d96627b55 /drivers/mmc/host/au1xmmc.c | |
parent | bc068d38c905ddfca017fa858d38cc8a369f13f5 (diff) | |
download | lwn-67d7d920b3f0dc72651945ba6256e7777a5fe4d1.tar.gz lwn-67d7d920b3f0dc72651945ba6256e7777a5fe4d1.zip |
mmc: au1xmmc: switch to platform_get_irq
platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for
requesting IRQ's resources, as they can be not ready yet. Using
platform_get_irq() instead is preferred for getting IRQ even if it
was not retrieved earlier.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Link: https://lore.kernel.org/r/20191215175120.3290-13-tiny.windzz@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/au1xmmc.c')
-rw-r--r-- | drivers/mmc/host/au1xmmc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index bc8aeb47a7b4..8823680ca42c 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -984,12 +984,9 @@ static int au1xmmc_probe(struct platform_device *pdev) goto out2; } - r = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!r) { - dev_err(&pdev->dev, "no IRQ defined\n"); + host->irq = platform_get_irq(pdev, 0); + if (host->irq < 0) goto out3; - } - host->irq = r->start; mmc->ops = &au1xmmc_ops; |