Skip to content

Commit faf97b8

Browse files
geertustorulf
authored andcommitted
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: 7723f4c ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Yoshihiro Shimoda <[email protected]> Tested-by: Yoshihiro Shimoda <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Tested-by: Wolfram Sang <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent e8307ec commit faf97b8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/mmc/host/sh_mmcif.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,11 +1393,9 @@ static int sh_mmcif_probe(struct platform_device *pdev)
13931393
const char *name;
13941394

13951395
irq[0] = platform_get_irq(pdev, 0);
1396-
irq[1] = platform_get_irq(pdev, 1);
1397-
if (irq[0] < 0) {
1398-
dev_err(dev, "Get irq error\n");
1396+
irq[1] = platform_get_irq_optional(pdev, 1);
1397+
if (irq[0] < 0)
13991398
return -ENXIO;
1400-
}
14011399

14021400
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
14031401
reg = devm_ioremap_resource(dev, res);

0 commit comments

Comments
 (0)