From: Yangtao Li Date: Sun, 15 Dec 2019 17:51:20 +0000 (+0000) Subject: mmc: au1xmmc: switch to platform_get_irq X-Git-Tag: v5.6-rc1~200^2~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=67d7d920b3f0dc72651945ba6256e7777a5fe4d1;p=thirdparty%2Flinux.git 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 Link: https://lore.kernel.org/r/20191215175120.3290-13-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index bc8aeb47a7b48..8823680ca42c9 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;