Skip to content

Commit

Permalink
ASoC: fix kernel message grepability
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Mirosław <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
osctobe authored and broonie committed May 12, 2013
1 parent f722406 commit 10e8aa9
Showing 1 changed file with 43 additions and 34 deletions.
77 changes: 43 additions & 34 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
codec->debugfs_codec_root = debugfs_create_dir(codec->name,
debugfs_card_root);
if (!codec->debugfs_codec_root) {
dev_warn(codec->dev, "ASoC: Failed to create codec debugfs"
" directory\n");
dev_warn(codec->dev,
"ASoC: Failed to create codec debugfs directory\n");
return;
}

Expand All @@ -286,8 +286,8 @@ static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
codec->debugfs_codec_root,
codec, &codec_reg_fops);
if (!codec->debugfs_reg)
dev_warn(codec->dev, "ASoC: Failed to create codec register"
" debugfs file\n");
dev_warn(codec->dev,
"ASoC: Failed to create codec register debugfs file\n");

snd_soc_dapm_debugfs_init(&codec->dapm, codec->debugfs_codec_root);
}
Expand Down Expand Up @@ -631,8 +631,7 @@ int snd_soc_suspend(struct device *dev)
*/
if (codec->dapm.idle_bias_off) {
dev_dbg(codec->dev,
"ASoC: idle_bias_off CODEC on"
" over suspend\n");
"ASoC: idle_bias_off CODEC on over suspend\n");
break;
}
case SND_SOC_BIAS_OFF:
Expand All @@ -643,8 +642,8 @@ int snd_soc_suspend(struct device *dev)
regcache_mark_dirty(codec->control_data);
break;
default:
dev_dbg(codec->dev, "ASoC: CODEC is on"
" over suspend\n");
dev_dbg(codec->dev,
"ASoC: CODEC is on over suspend\n");
break;
}
}
Expand Down Expand Up @@ -713,8 +712,8 @@ static void soc_resume_deferred(struct work_struct *work)
codec->suspended = 0;
break;
default:
dev_dbg(codec->dev, "ASoC: CODEC was on over"
" suspend\n");
dev_dbg(codec->dev,
"ASoC: CODEC was on over suspend\n");
break;
}
}
Expand Down Expand Up @@ -1110,8 +1109,8 @@ static int soc_probe_codec(struct snd_soc_card *card,
}
WARN(codec->dapm.idle_bias_off &&
codec->dapm.bias_level != SND_SOC_BIAS_OFF,
"codec %s can not start from non-off bias"
" with idle_bias_off==1\n", codec->name);
"codec %s can not start from non-off bias with idle_bias_off==1\n",
codec->name);
}

/* If the driver didn't set I/O up try regmap */
Expand Down Expand Up @@ -1582,8 +1581,9 @@ static int snd_soc_init_codec_cache(struct snd_soc_codec *codec,
codec->compress_type = compress_type;
ret = snd_soc_cache_init(codec);
if (ret < 0) {
dev_err(codec->dev, "ASoC: Failed to set cache compression"
" type: %d\n", ret);
dev_err(codec->dev,
"ASoC: Failed to set cache compression type: %d\n",
ret);
return ret;
}
codec->cache_init = 1;
Expand Down Expand Up @@ -1639,8 +1639,9 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
ret = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
card->owner, 0, &card->snd_card);
if (ret < 0) {
dev_err(card->dev, "ASoC: can't create sound card for"
" card %s: %d\n", card->name, ret);
dev_err(card->dev,
"ASoC: can't create sound card for card %s: %d\n",
card->name, ret);
goto base_error;
}
card->snd_card->dev = card->dev;
Expand Down Expand Up @@ -1815,8 +1816,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
for (i = 0; i < card->num_rtd; i++) {
ret = soc_register_ac97_dai_link(&card->rtd[i]);
if (ret < 0) {
dev_err(card->dev, "ASoC: failed to register AC97:"
" %d\n", ret);
dev_err(card->dev,
"ASoC: failed to register AC97: %d\n", ret);
while (--i >= 0)
soc_unregister_ac97_dai_link(card->rtd[i].codec);
goto probe_aux_dev_err;
Expand Down Expand Up @@ -3586,14 +3587,16 @@ int snd_soc_register_card(struct snd_soc_card *card)
* not both or neither.
*/
if (!!link->codec_name == !!link->codec_of_node) {
dev_err(card->dev, "ASoC: Neither/both codec"
" name/of_node are set for %s\n", link->name);
dev_err(card->dev,
"ASoC: Neither/both codec name/of_node are set for %s\n",
link->name);
return -EINVAL;
}
/* Codec DAI name must be specified */
if (!link->codec_dai_name) {
dev_err(card->dev, "ASoC: codec_dai_name not"
" set for %s\n", link->name);
dev_err(card->dev,
"ASoC: codec_dai_name not set for %s\n",
link->name);
return -EINVAL;
}

Expand All @@ -3602,8 +3605,9 @@ int snd_soc_register_card(struct snd_soc_card *card)
* can be left unspecified, and a dummy platform will be used.
*/
if (link->platform_name && link->platform_of_node) {
dev_err(card->dev, "ASoC: Both platform name/of_node"
" are set for %s\n", link->name);
dev_err(card->dev,
"ASoC: Both platform name/of_node are set for %s\n",
link->name);
return -EINVAL;
}

Expand All @@ -3613,8 +3617,9 @@ int snd_soc_register_card(struct snd_soc_card *card)
* name alone..
*/
if (link->cpu_name && link->cpu_of_node) {
dev_err(card->dev, "ASoC: Neither/both "
"cpu name/of_node are set for %s\n",link->name);
dev_err(card->dev,
"ASoC: Neither/both cpu name/of_node are set for %s\n",
link->name);
return -EINVAL;
}
/*
Expand All @@ -3623,8 +3628,9 @@ int snd_soc_register_card(struct snd_soc_card *card)
*/
if (!link->cpu_dai_name &&
!(link->cpu_name || link->cpu_of_node)) {
dev_err(card->dev, "ASoC: Neither cpu_dai_name nor "
"cpu_name/of_node are set for %s\n", link->name);
dev_err(card->dev,
"ASoC: Neither cpu_dai_name nor cpu_name/of_node are set for %s\n",
link->name);
return -EINVAL;
}
}
Expand Down Expand Up @@ -3728,8 +3734,9 @@ static inline char *fmt_multiple_name(struct device *dev,
struct snd_soc_dai_driver *dai_drv)
{
if (dai_drv->name == NULL) {
dev_err(dev, "ASoC: error - multiple DAI %s registered with"
" no name\n", dev_name(dev));
dev_err(dev,
"ASoC: error - multiple DAI %s registered with no name\n",
dev_name(dev));
return NULL;
}

Expand Down Expand Up @@ -3859,8 +3866,9 @@ static int snd_soc_register_dais(struct device *dev,

list_for_each_entry(codec, &codec_list, list) {
if (codec->dev == dev) {
dev_dbg(dev, "ASoC: Mapped DAI %s to "
"CODEC %s\n", dai->name, codec->name);
dev_dbg(dev,
"ASoC: Mapped DAI %s to CODEC %s\n",
dai->name, codec->name);
dai->codec = codec;
break;
}
Expand Down Expand Up @@ -4296,8 +4304,9 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,

num_routes = of_property_count_strings(np, propname);
if (num_routes < 0 || num_routes & 1) {
dev_err(card->dev, "ASoC: Property '%s' does not exist or its"
" length is not even\n", propname);
dev_err(card->dev,
"ASoC: Property '%s' does not exist or its length is not even\n",
propname);
return -EINVAL;
}
num_routes /= 2;
Expand Down

0 comments on commit 10e8aa9

Please sign in to comment.