diff mbox series

[7/7] ASoC: qcom: common: Avoid printing errors for -EPROBE_DEFER

Message ID 20200723183904.321040-8-stephan@gerhold.net (mailing list archive)
State Accepted
Commit a63419beafd4edf20761c37dbefd639a0b1b481e
Headers show
Series ASoC: qcom: Use qcom_snd_parse_of() for apq8016_sbc | expand

Commit Message

Stephan Gerhold July 23, 2020, 6:39 p.m. UTC
qcom_snd_parse_of() tends to produce lots of error messages during bootup:

	MultiMedia1: error getting cpu dai name

This happens because the DAIs are not probed until the ADSP remoteproc
has booted, which takes a while. Until it is ready, snd_soc_of_get_dai_name()
returns -EDEFER_PROBE to retry probing later. This is perfectly normal,
so cleanup the kernel log a bit by not printing in case of -EPROBE_DEFER.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 sound/soc/qcom/common.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c
index 84dba0d69e6b..5194d90ddb96 100644
--- a/sound/soc/qcom/common.c
+++ b/sound/soc/qcom/common.c
@@ -88,7 +88,9 @@  int qcom_snd_parse_of(struct snd_soc_card *card)
 
 		ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name);
 		if (ret) {
-			dev_err(card->dev, "%s: error getting cpu dai name\n", link->name);
+			if (ret != -EPROBE_DEFER)
+				dev_err(card->dev, "%s: error getting cpu dai name: %d\n",
+					link->name, ret);
 			goto err;
 		}
 
@@ -108,7 +110,9 @@  int qcom_snd_parse_of(struct snd_soc_card *card)
 		if (codec) {
 			ret = snd_soc_of_get_dai_link_codecs(dev, codec, link);
 			if (ret < 0) {
-				dev_err(card->dev, "%s: codec dai not found\n", link->name);
+				if (ret != -EPROBE_DEFER)
+					dev_err(card->dev, "%s: codec dai not found: %d\n",
+						link->name, ret);
 				goto err;
 			}