aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/sh/rcar/dma.c
diff options
context:
space:
mode:
authorGravatar Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 2018-09-06 03:21:47 +0000
committerGravatar Mark Brown <broonie@kernel.org> 2018-09-06 11:13:24 +0100
commit6c92d5a2744e27619a8fcc9d74b91ee9f1cdebd1 (patch)
tree335404facbecb446b854b847828dac5b02947a3f /sound/soc/sh/rcar/dma.c
parentASoC: rsnd: adg: care clock-frequency size (diff)
downloadlinux-6c92d5a2744e27619a8fcc9d74b91ee9f1cdebd1.tar.gz
linux-6c92d5a2744e27619a8fcc9d74b91ee9f1cdebd1.tar.bz2
linux-6c92d5a2744e27619a8fcc9d74b91ee9f1cdebd1.zip
ASoC: rsnd: don't fallback to PIO mode when -EPROBE_DEFER
Current rsnd driver will fallback to PIO mode if it can't get DMA handler. But, DMA might return -EPROBE_DEFER when probe timing. This driver always fallback to PIO mode especially from commit ac6bbf0cdf4206c ("iommu: Remove IOMMU_OF_DECLARE") because of this reason. The DMA driver will be probed later, but sound driver might be probed as PIO mode in such case. This patch fixup this issue. Then, -EPROBE_DEFER is not error. Thus, let's don't indicate error message in such case. And it needs to call rsnd_adg_remove() individually if probe failed, because it registers clk which should be unregister. Maybe PIO fallback feature itself is not needed, but let's keep it so far. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/dma.c')
-rw-r--r--sound/soc/sh/rcar/dma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index fe63ef8600d0..d65ea7bc4dac 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -241,6 +241,10 @@ static int rsnd_dmaen_attach(struct rsnd_dai_stream *io,
/* try to get DMAEngine channel */
chan = rsnd_dmaen_request_channel(io, mod_from, mod_to);
if (IS_ERR_OR_NULL(chan)) {
+ /* Let's follow when -EPROBE_DEFER case */
+ if (PTR_ERR(chan) == -EPROBE_DEFER)
+ return PTR_ERR(chan);
+
/*
* DMA failed. try to PIO mode
* see