From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mark Brown <broonie@kernel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Hans de Goede <hdegoede@redhat.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Jie Yang <yang.jie@linux.intel.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 4/4] ASoC: Intel: bytcr_rt5640: Utilize dev_err_probe() to avoid log saturation
Date: Thu, 7 Oct 2021 19:57:15 +0300 [thread overview]
Message-ID: <20211007165715.27463-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20211007165715.27463-1-andriy.shevchenko@linux.intel.com>
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
sound/soc/intel/boards/bytcr_rt5640.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 2e7d45f0f05d..a0c5f0e9c22a 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -1617,8 +1617,8 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
"headset-mic-detect", GPIOD_IN,
"headset-mic-detect");
if (IS_ERR(priv->hsmic_detect)) {
- ret_val = PTR_ERR(priv->hsmic_detect);
- dev_err_probe(dev, ret_val, "getting hsmic-detect GPIO\n");
+ ret_val = dev_err_probe(dev, PTR_ERR(priv->hsmic_detect),
+ "getting hsmic-detect GPIO\n");
goto err_device;
}
}
@@ -1645,12 +1645,8 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN) {
priv->mclk = devm_clk_get_optional(dev, "pmc_plt_clk_3");
if (IS_ERR(priv->mclk)) {
- ret_val = PTR_ERR(priv->mclk);
-
- dev_err(dev,
- "Failed to get MCLK from pmc_plt_clk_3: %d\n",
- ret_val);
-
+ ret_val = dev_err_probe(dev, PTR_ERR(priv->mclk),
+ "Failed to get MCLK from pmc_plt_clk_3\n");
goto err;
}
/*
--
2.33.0
next prev parent reply other threads:[~2021-10-07 16:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 16:57 [PATCH v2 0/4] ASoC: Intel: bytcr_rt5640: few cleanups Andy Shevchenko
2021-10-07 16:57 ` [PATCH v2 1/4] ASoC: Intel: bytcr_rt5640: Get platform data via dev_get_platdata() Andy Shevchenko
2021-10-07 16:57 ` [PATCH v2 2/4] ASoC: Intel: bytcr_rt5640: Use temporary variable for struct device Andy Shevchenko
2021-10-07 16:57 ` [PATCH v2 3/4] ASoC: Intel: bytcr_rt5640: use devm_clk_get_optional() for mclk Andy Shevchenko
2021-10-07 16:57 ` Andy Shevchenko [this message]
2021-10-10 20:31 ` [PATCH v2 0/4] ASoC: Intel: bytcr_rt5640: few cleanups Hans de Goede
2021-10-11 14:19 ` Pierre-Louis Bossart
2021-10-11 17:01 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211007165715.27463-5-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=hdegoede@redhat.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.com \
--cc=yang.jie@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox