Skip to content

Commit 5d1f42e

Browse files
masahir0ystorulf
authored andcommitted
mmc: uniphier-sd: call devm_request_irq() after tmio_mmc_host_probe()
Currently, tmio_mmc_irq() handler is registered before the host is fully initialized by tmio_mmc_host_probe(). I did not previously notice this problem. The boot ROM of a new Socionext SoC unmasks interrupts (CTL_IRQ_MASK) somehow. The handler is invoked before tmio_mmc_host_probe(), then emits noisy call trace. Move devm_request_irq() below tmio_mmc_host_probe(). Fixes: 3fd784f ("mmc: uniphier-sd: add UniPhier SD/eMMC controller driver") Signed-off-by: Masahiro Yamada <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 1ae1d2d commit 5d1f42e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

drivers/mmc/host/uniphier-sd.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,6 @@ static int uniphier_sd_probe(struct platform_device *pdev)
610610
}
611611
}
612612

613-
ret = devm_request_irq(dev, irq, tmio_mmc_irq, IRQF_SHARED,
614-
dev_name(dev), host);
615-
if (ret)
616-
goto free_host;
617-
618613
if (priv->caps & UNIPHIER_SD_CAP_EXTENDED_IP)
619614
host->dma_ops = &uniphier_sd_internal_dma_ops;
620615
else
@@ -642,8 +637,15 @@ static int uniphier_sd_probe(struct platform_device *pdev)
642637
if (ret)
643638
goto free_host;
644639

640+
ret = devm_request_irq(dev, irq, tmio_mmc_irq, IRQF_SHARED,
641+
dev_name(dev), host);
642+
if (ret)
643+
goto remove_host;
644+
645645
return 0;
646646

647+
remove_host:
648+
tmio_mmc_host_remove(host);
647649
free_host:
648650
tmio_mmc_host_free(host);
649651

0 commit comments

Comments
 (0)