Commit ee233500 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown

ASoC: Intel: bytcr_rt5640: Utilize dev_err_probe() to avoid log saturation

dev_err_probe() avoids printing into log when the deferred probe is invoked.
This is possible when clock provider is pending to appear.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211007165715.27463-5-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a15ca6e3
...@@ -1617,8 +1617,8 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) ...@@ -1617,8 +1617,8 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
"headset-mic-detect", GPIOD_IN, "headset-mic-detect", GPIOD_IN,
"headset-mic-detect"); "headset-mic-detect");
if (IS_ERR(priv->hsmic_detect)) { if (IS_ERR(priv->hsmic_detect)) {
ret_val = PTR_ERR(priv->hsmic_detect); ret_val = dev_err_probe(dev, PTR_ERR(priv->hsmic_detect),
dev_err_probe(dev, ret_val, "getting hsmic-detect GPIO\n"); "getting hsmic-detect GPIO\n");
goto err_device; goto err_device;
} }
} }
...@@ -1645,12 +1645,8 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) ...@@ -1645,12 +1645,8 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN) { if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN) {
priv->mclk = devm_clk_get_optional(dev, "pmc_plt_clk_3"); priv->mclk = devm_clk_get_optional(dev, "pmc_plt_clk_3");
if (IS_ERR(priv->mclk)) { if (IS_ERR(priv->mclk)) {
ret_val = PTR_ERR(priv->mclk); ret_val = dev_err_probe(dev, PTR_ERR(priv->mclk),
"Failed to get MCLK from pmc_plt_clk_3\n");
dev_err(dev,
"Failed to get MCLK from pmc_plt_clk_3: %d\n",
ret_val);
goto err; goto err;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment