diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2019-10-01 14:08:34 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2019-10-03 05:38:37 -0400 |
commit | faf97b84fa86d40eba5a30e9071dfb55133fb1b7 (patch) | |
tree | 43ed26605ea6be613c9bb423359e30ccf137029e /drivers/mmc | |
parent | e8307ec51efebf579da5966aa5da5ab5353c61c7 (diff) |
mmc: sh_mmcif: Use platform_get_irq_optional() for optional interrupt
As platform_get_irq() now prints an error when the interrupt does not
exist, a scary warning may be printed for an optional interrupt:
sh_mmcif ee200000.mmc: IRQ index 1 not found
Fix this by calling platform_get_irq_optional() instead for the second
interrupt, which is optional.
Remove the now superfluous error printing for the first interrupt, which
is mandatory.
Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sh_mmcif.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 81bd9afb0980..98c575de43c7 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c | |||
@@ -1393,11 +1393,9 @@ static int sh_mmcif_probe(struct platform_device *pdev) | |||
1393 | const char *name; | 1393 | const char *name; |
1394 | 1394 | ||
1395 | irq[0] = platform_get_irq(pdev, 0); | 1395 | irq[0] = platform_get_irq(pdev, 0); |
1396 | irq[1] = platform_get_irq(pdev, 1); | 1396 | irq[1] = platform_get_irq_optional(pdev, 1); |
1397 | if (irq[0] < 0) { | 1397 | if (irq[0] < 0) |
1398 | dev_err(dev, "Get irq error\n"); | ||
1399 | return -ENXIO; | 1398 | return -ENXIO; |
1400 | } | ||
1401 | 1399 | ||
1402 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1400 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1403 | reg = devm_ioremap_resource(dev, res); | 1401 | reg = devm_ioremap_resource(dev, res); |