ASoC: AMD: Clean kernel log from deferred probe error messages
authorAkshu Agrawal <akshu.agrawal@amd.com>
Wed, 26 Aug 2020 18:54:20 +0000 (00:24 +0530)
committerMark Brown <broonie@kernel.org>
Thu, 27 Aug 2020 13:43:23 +0000 (14:43 +0100)
While the driver waits for DAIs to be probed and retries probing,
have the error messages at debug level instead of error.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Link: https://lore.kernel.org/r/20200826185454.5545-1-akshu.agrawal@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp3x-rt5682-max9836.c

index 406526e..1a4e8ca 100644 (file)
@@ -472,12 +472,17 @@ static int acp3x_probe(struct platform_device *pdev)
 
        ret = devm_snd_soc_register_card(&pdev->dev, card);
        if (ret) {
-               dev_err(&pdev->dev,
+               if (ret != -EPROBE_DEFER)
+                       dev_err(&pdev->dev,
                                "devm_snd_soc_register_card(%s) failed: %d\n",
                                card->name, ret);
-               return ret;
+               else
+                       dev_dbg(&pdev->dev,
+                               "devm_snd_soc_register_card(%s) probe deferred: %d\n",
+                               card->name, ret);
        }
-       return 0;
+
+       return ret;
 }
 
 static const struct acpi_device_id acp3x_audio_acpi_match[] = {