Commit 154bab12 authored by Denis Carikli's avatar Denis Carikli Committed by Mark Brown

ASoC: eukrea-tlv320: Use dev_err instead of pr_err.

It also contains a minor style cleanup.
Signed-off-by: default avatarDenis Carikli <denis@eukrea.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 1abe729f
...@@ -42,7 +42,8 @@ static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream, ...@@ -42,7 +42,8 @@ static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream,
SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBM_CFM); SND_SOC_DAIFMT_CBM_CFM);
if (ret) { if (ret) {
pr_err("%s: failed set cpu dai format\n", __func__); dev_err(cpu_dai->dev,
"Failed to set the cpu dai format.\n");
return ret; return ret;
} }
...@@ -50,14 +51,16 @@ static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream, ...@@ -50,14 +51,16 @@ static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream,
SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBM_CFM); SND_SOC_DAIFMT_CBM_CFM);
if (ret) { if (ret) {
pr_err("%s: failed set codec dai format\n", __func__); dev_err(cpu_dai->dev,
"Failed to set the codec format.\n");
return ret; return ret;
} }
ret = snd_soc_dai_set_sysclk(codec_dai, 0, ret = snd_soc_dai_set_sysclk(codec_dai, 0,
CODEC_CLOCK, SND_SOC_CLOCK_OUT); CODEC_CLOCK, SND_SOC_CLOCK_OUT);
if (ret) { if (ret) {
pr_err("%s: failed setting codec sysclk\n", __func__); dev_err(cpu_dai->dev,
"Failed to set the codec sysclk.\n");
return ret; return ret;
} }
snd_soc_dai_set_tdm_slot(cpu_dai, 0xffffffc, 0xffffffc, 2, 0); snd_soc_dai_set_tdm_slot(cpu_dai, 0xffffffc, 0xffffffc, 2, 0);
...@@ -65,7 +68,8 @@ static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream, ...@@ -65,7 +68,8 @@ static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream,
ret = snd_soc_dai_set_sysclk(cpu_dai, IMX_SSP_SYS_CLK, 0, ret = snd_soc_dai_set_sysclk(cpu_dai, IMX_SSP_SYS_CLK, 0,
SND_SOC_CLOCK_IN); SND_SOC_CLOCK_IN);
if (ret) { if (ret) {
pr_err("can't set CPU system clock IMX_SSP_SYS_CLK\n"); dev_err(cpu_dai->dev,
"Can't set the IMX_SSP_SYS_CLK CPU system clock.\n");
return ret; return ret;
} }
...@@ -155,7 +159,8 @@ static struct platform_driver eukrea_tlv320_driver = { ...@@ -155,7 +159,8 @@ static struct platform_driver eukrea_tlv320_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.probe = eukrea_tlv320_probe, .probe = eukrea_tlv320_probe,
.remove = eukrea_tlv320_remove,}; .remove = eukrea_tlv320_remove,
};
module_platform_driver(eukrea_tlv320_driver); module_platform_driver(eukrea_tlv320_driver);
......
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