[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1488552768-14901-6-git-send-email-ryans.lee@maximintegrated.com>
Date: Fri, 3 Mar 2017 23:52:43 +0900
From: Ryan Lee <ryans.lee@...imintegrated.com>
To: <lgirdwood@...il.com>, <broonie@...nel.org>, <robh+dt@...nel.org>,
<mark.rutland@....com>, <perex@...ex.cz>, <tiwai@...e.com>,
<arnd@...db.de>, <michael@...rulasolutions.com>,
<oder_chiou@...ltek.com>, <yesanishhere@...il.com>,
<jacob@...nage.engineering>, <Damien.Horsley@...tec.com>,
<bardliao@...ltek.com>, <kuninori.morimoto.gx@...esas.com>,
<petr@...ix.com>, <lars@...afoo.de>, <nh6z@...z.net>,
<ryans.lee@...imintegrated.com>, <alsa-devel@...a-project.org>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <kernel-janitors@...r.kernel.org>
Subject: [PATCH 05/10] Replaced pr_err by dev_err. Modified debug message
Signed-off-by: Ryan Lee <ryans.lee@...imintegrated.com>
---
Replaced 'pr_err' by 'dev_err'. Modified error message.
sound/soc/codecs/max98927.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c
index efc761b..0abf6d3 100755
--- a/sound/soc/codecs/max98927.c
+++ b/sound/soc/codecs/max98927.c
@@ -254,6 +254,7 @@ static const int rate_table[] = {
static int max98927_set_clock(struct max98927_priv *max98927,
struct snd_pcm_hw_params *params)
{
+ struct snd_soc_codec *codec = max98927->codec;
/* BCLK/LRCLK ratio calculation */
int blr_clk_ratio = params_channels(params) * max98927->ch_size;
int reg = MAX98927_R0022_PCM_CLK_SETUP;
@@ -268,8 +269,7 @@ static int max98927_set_clock(struct max98927_priv *max98927,
break;
}
if (i == ARRAY_SIZE(rate_table)) {
- pr_err("%s couldn't get the MCLK to match codec\n",
- __func__);
+ dev_err(codec->dev, "failed to find proper clock rate.\n");
return -EINVAL;
}
regmap_update_bits(max98927->regmap,
@@ -327,12 +327,12 @@ static int max98927_dai_hw_params(struct snd_pcm_substream *substream,
max98927->ch_size = 32;
break;
default:
- pr_err("%s: format unsupported %d",
- __func__, params_format(params));
+ dev_err(codec->dev, "format unsupported %d",
+ params_format(params));
goto err;
}
- dev_dbg(codec->dev, "%s: format supported %d",
- __func__, params_format(params));
+ dev_dbg(codec->dev, "format supported %d",
+ params_format(params));
/* sampling rate configuration */
switch (params_rate(params)) {
@@ -364,8 +364,8 @@ static int max98927_dai_hw_params(struct snd_pcm_substream *substream,
sampling_rate |= MAX98927_PCM_SR_SET1_SR_48000;
break;
default:
- pr_err("%s rate %d not supported\n",
- __func__, params_rate(params));
+ dev_err(codec->dev, "rate %d not supported\n",
+ params_rate(params));
goto err;
}
/* set DAI_SR to correct LRCLK frequency */
@@ -490,7 +490,7 @@ static int max98927_digital_gain_get(struct snd_kcontrol *kcontrol,
struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec);
ucontrol->value.integer.value[0] = max98927->digital_gain;
- dev_dbg(codec->dev, "%s: spk_gain setting returned %d\n", __func__,
+ dev_dbg(codec->dev, "%s: digital_gain setting returned %d\n", __func__,
(int) ucontrol->value.integer.value[0]);
return 0;
}
--
2.7.4
Powered by blists - more mailing lists