aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2012-11-19 09:47:09 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-20 21:40:00 -0500
commitf110bfc7ac552f2518d38067e5facf53c24748ba (patch)
tree8431683c2f867d5dcaf9729a0511bde680bd1821 /sound/soc
parent103d84a3cbe1e70a2ade5a901d2e31cda41b14a0 (diff)
ASoC: core: Standardise ASoC messages
Currently ASoC has a mixture of message prefixes e.g. "ASoC", "asoc" or none and message types e.g. pr_debug or dev_dbg. Make sure all ASoC core messages use the same "ASoC" prefix and convert any component device specific messages to use dev_dbg instead of pr_debug. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c241
1 files changed, 123 insertions, 118 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 10d21be383f6..cee37ee6f180 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -271,7 +271,8 @@ static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
271 codec->debugfs_codec_root = debugfs_create_dir(codec->name, 271 codec->debugfs_codec_root = debugfs_create_dir(codec->name,
272 debugfs_card_root); 272 debugfs_card_root);
273 if (!codec->debugfs_codec_root) { 273 if (!codec->debugfs_codec_root) {
274 dev_warn(codec->dev, "Failed to create codec debugfs directory\n"); 274 dev_warn(codec->dev, "ASoC: Failed to create codec debugfs"
275 " directory\n");
275 return; 276 return;
276 } 277 }
277 278
@@ -284,7 +285,8 @@ static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
284 codec->debugfs_codec_root, 285 codec->debugfs_codec_root,
285 codec, &codec_reg_fops); 286 codec, &codec_reg_fops);
286 if (!codec->debugfs_reg) 287 if (!codec->debugfs_reg)
287 dev_warn(codec->dev, "Failed to create codec register debugfs file\n"); 288 dev_warn(codec->dev, "ASoC: Failed to create codec register"
289 " debugfs file\n");
288 290
289 snd_soc_dapm_debugfs_init(&codec->dapm, codec->debugfs_codec_root); 291 snd_soc_dapm_debugfs_init(&codec->dapm, codec->debugfs_codec_root);
290} 292}
@@ -302,7 +304,7 @@ static void soc_init_platform_debugfs(struct snd_soc_platform *platform)
302 debugfs_card_root); 304 debugfs_card_root);
303 if (!platform->debugfs_platform_root) { 305 if (!platform->debugfs_platform_root) {
304 dev_warn(platform->dev, 306 dev_warn(platform->dev,
305 "Failed to create platform debugfs directory\n"); 307 "ASoC: Failed to create platform debugfs directory\n");
306 return; 308 return;
307 } 309 }
308 310
@@ -430,7 +432,7 @@ static void soc_init_card_debugfs(struct snd_soc_card *card)
430 &card->pop_time); 432 &card->pop_time);
431 if (!card->debugfs_pop_time) 433 if (!card->debugfs_pop_time)
432 dev_warn(card->dev, 434 dev_warn(card->dev,
433 "Failed to create pop time debugfs file\n"); 435 "ASoC: Failed to create pop time debugfs file\n");
434} 436}
435 437
436static void soc_cleanup_card_debugfs(struct snd_soc_card *card) 438static void soc_cleanup_card_debugfs(struct snd_soc_card *card)
@@ -475,7 +477,7 @@ struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
475 !strcmp(card->rtd[i].dai_link->name, dai_link)) 477 !strcmp(card->rtd[i].dai_link->name, dai_link))
476 return card->rtd[i].pcm->streams[stream].substream; 478 return card->rtd[i].pcm->streams[stream].substream;
477 } 479 }
478 dev_dbg(card->dev, "failed to find dai link %s\n", dai_link); 480 dev_dbg(card->dev, "ASoC: failed to find dai link %s\n", dai_link);
479 return NULL; 481 return NULL;
480} 482}
481EXPORT_SYMBOL_GPL(snd_soc_get_dai_substream); 483EXPORT_SYMBOL_GPL(snd_soc_get_dai_substream);
@@ -489,7 +491,7 @@ struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card,
489 if (!strcmp(card->rtd[i].dai_link->name, dai_link)) 491 if (!strcmp(card->rtd[i].dai_link->name, dai_link))
490 return &card->rtd[i]; 492 return &card->rtd[i];
491 } 493 }
492 dev_dbg(card->dev, "failed to find rtd %s\n", dai_link); 494 dev_dbg(card->dev, "ASoC: failed to find rtd %s\n", dai_link);
493 return NULL; 495 return NULL;
494} 496}
495EXPORT_SYMBOL_GPL(snd_soc_get_pcm_runtime); 497EXPORT_SYMBOL_GPL(snd_soc_get_pcm_runtime);
@@ -519,7 +521,7 @@ static int soc_ac97_dev_register(struct snd_soc_codec *codec)
519 codec->card->snd_card->number, 0, codec->name); 521 codec->card->snd_card->number, 0, codec->name);
520 err = device_register(&codec->ac97->dev); 522 err = device_register(&codec->ac97->dev);
521 if (err < 0) { 523 if (err < 0) {
522 snd_printk(KERN_ERR "Can't register ac97 bus\n"); 524 dev_err(codec->dev, "ASoC: Can't register ac97 bus\n");
523 codec->ac97->dev.bus = NULL; 525 codec->ac97->dev.bus = NULL;
524 return err; 526 return err;
525 } 527 }
@@ -628,7 +630,8 @@ int snd_soc_suspend(struct device *dev)
628 */ 630 */
629 if (codec->dapm.idle_bias_off) { 631 if (codec->dapm.idle_bias_off) {
630 dev_dbg(codec->dev, 632 dev_dbg(codec->dev,
631 "idle_bias_off CODEC on over suspend\n"); 633 "ASoC: idle_bias_off CODEC on"
634 " over suspend\n");
632 break; 635 break;
633 } 636 }
634 case SND_SOC_BIAS_OFF: 637 case SND_SOC_BIAS_OFF:
@@ -639,7 +642,8 @@ int snd_soc_suspend(struct device *dev)
639 regcache_mark_dirty(codec->control_data); 642 regcache_mark_dirty(codec->control_data);
640 break; 643 break;
641 default: 644 default:
642 dev_dbg(codec->dev, "CODEC is on over suspend\n"); 645 dev_dbg(codec->dev, "ASoC: CODEC is on"
646 " over suspend\n");
643 break; 647 break;
644 } 648 }
645 } 649 }
@@ -676,7 +680,7 @@ static void soc_resume_deferred(struct work_struct *work)
676 * so userspace apps are blocked from touching us 680 * so userspace apps are blocked from touching us
677 */ 681 */
678 682
679 dev_dbg(card->dev, "starting resume work\n"); 683 dev_dbg(card->dev, "ASoC: starting resume work\n");
680 684
681 /* Bring us up into D2 so that DAPM starts enabling things */ 685 /* Bring us up into D2 so that DAPM starts enabling things */
682 snd_power_change_state(card->snd_card, SNDRV_CTL_POWER_D2); 686 snd_power_change_state(card->snd_card, SNDRV_CTL_POWER_D2);
@@ -708,7 +712,8 @@ static void soc_resume_deferred(struct work_struct *work)
708 codec->suspended = 0; 712 codec->suspended = 0;
709 break; 713 break;
710 default: 714 default:
711 dev_dbg(codec->dev, "CODEC was on over suspend\n"); 715 dev_dbg(codec->dev, "ASoC: CODEC was on over"
716 " suspend\n");
712 break; 717 break;
713 } 718 }
714 } 719 }
@@ -758,7 +763,7 @@ static void soc_resume_deferred(struct work_struct *work)
758 if (card->resume_post) 763 if (card->resume_post)
759 card->resume_post(card); 764 card->resume_post(card);
760 765
761 dev_dbg(card->dev, "resume work completed\n"); 766 dev_dbg(card->dev, "ASoC: resume work completed\n");
762 767
763 /* userspace can access us now we are back as we were before */ 768 /* userspace can access us now we are back as we were before */
764 snd_power_change_state(card->snd_card, SNDRV_CTL_POWER_D0); 769 snd_power_change_state(card->snd_card, SNDRV_CTL_POWER_D0);
@@ -790,12 +795,12 @@ int snd_soc_resume(struct device *dev)
790 ac97_control |= cpu_dai->driver->ac97_control; 795 ac97_control |= cpu_dai->driver->ac97_control;
791 } 796 }
792 if (ac97_control) { 797 if (ac97_control) {
793 dev_dbg(dev, "Resuming AC97 immediately\n"); 798 dev_dbg(dev, "ASoC: Resuming AC97 immediately\n");
794 soc_resume_deferred(&card->deferred_resume_work); 799 soc_resume_deferred(&card->deferred_resume_work);
795 } else { 800 } else {
796 dev_dbg(dev, "Scheduling resume work\n"); 801 dev_dbg(dev, "ASoC: Scheduling resume work\n");
797 if (!schedule_work(&card->deferred_resume_work)) 802 if (!schedule_work(&card->deferred_resume_work))
798 dev_err(dev, "resume work item may be lost\n"); 803 dev_err(dev, "ASoC: resume work item may be lost\n");
799 } 804 }
800 805
801 return 0; 806 return 0;
@@ -818,7 +823,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
818 struct snd_soc_dai *codec_dai, *cpu_dai; 823 struct snd_soc_dai *codec_dai, *cpu_dai;
819 const char *platform_name; 824 const char *platform_name;
820 825
821 dev_dbg(card->dev, "binding %s at idx %d\n", dai_link->name, num); 826 dev_dbg(card->dev, "ASoC: binding %s at idx %d\n", dai_link->name, num);
822 827
823 /* Find CPU DAI from registered DAIs*/ 828 /* Find CPU DAI from registered DAIs*/
824 list_for_each_entry(cpu_dai, &dai_list, list) { 829 list_for_each_entry(cpu_dai, &dai_list, list) {
@@ -836,7 +841,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
836 } 841 }
837 842
838 if (!rtd->cpu_dai) { 843 if (!rtd->cpu_dai) {
839 dev_err(card->dev, "CPU DAI %s not registered\n", 844 dev_err(card->dev, "ASoC: CPU DAI %s not registered\n",
840 dai_link->cpu_dai_name); 845 dai_link->cpu_dai_name);
841 return -EPROBE_DEFER; 846 return -EPROBE_DEFER;
842 } 847 }
@@ -867,14 +872,14 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
867 } 872 }
868 873
869 if (!rtd->codec_dai) { 874 if (!rtd->codec_dai) {
870 dev_err(card->dev, "CODEC DAI %s not registered\n", 875 dev_err(card->dev, "ASoC: CODEC DAI %s not registered\n",
871 dai_link->codec_dai_name); 876 dai_link->codec_dai_name);
872 return -EPROBE_DEFER; 877 return -EPROBE_DEFER;
873 } 878 }
874 } 879 }
875 880
876 if (!rtd->codec) { 881 if (!rtd->codec) {
877 dev_err(card->dev, "CODEC %s not registered\n", 882 dev_err(card->dev, "ASoC: CODEC %s not registered\n",
878 dai_link->codec_name); 883 dai_link->codec_name);
879 return -EPROBE_DEFER; 884 return -EPROBE_DEFER;
880 } 885 }
@@ -898,7 +903,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
898 rtd->platform = platform; 903 rtd->platform = platform;
899 } 904 }
900 if (!rtd->platform) { 905 if (!rtd->platform) {
901 dev_err(card->dev, "platform %s not registered\n", 906 dev_err(card->dev, "ASoC: platform %s not registered\n",
902 dai_link->platform_name); 907 dai_link->platform_name);
903 return -EPROBE_DEFER; 908 return -EPROBE_DEFER;
904 } 909 }
@@ -915,8 +920,8 @@ static int soc_remove_platform(struct snd_soc_platform *platform)
915 if (platform->driver->remove) { 920 if (platform->driver->remove) {
916 ret = platform->driver->remove(platform); 921 ret = platform->driver->remove(platform);
917 if (ret < 0) 922 if (ret < 0)
918 pr_err("asoc: failed to remove %s: %d\n", 923 dev_err(platform->dev, "ASoC: failed to remove %d\n",
919 platform->name, ret); 924 ret);
920 } 925 }
921 926
922 /* Make sure all DAPM widgets are freed */ 927 /* Make sure all DAPM widgets are freed */
@@ -937,9 +942,7 @@ static void soc_remove_codec(struct snd_soc_codec *codec)
937 if (codec->driver->remove) { 942 if (codec->driver->remove) {
938 err = codec->driver->remove(codec); 943 err = codec->driver->remove(codec);
939 if (err < 0) 944 if (err < 0)
940 dev_err(codec->dev, 945 dev_err(codec->dev, "ASoC: failed to remove %d\n", err);
941 "asoc: failed to remove %s: %d\n",
942 codec->name, err);
943 } 946 }
944 947
945 /* Make sure all DAPM widgets are freed */ 948 /* Make sure all DAPM widgets are freed */
@@ -971,8 +974,9 @@ static void soc_remove_link_dais(struct snd_soc_card *card, int num, int order)
971 if (codec_dai->driver->remove) { 974 if (codec_dai->driver->remove) {
972 err = codec_dai->driver->remove(codec_dai); 975 err = codec_dai->driver->remove(codec_dai);
973 if (err < 0) 976 if (err < 0)
974 pr_err("asoc: failed to remove %s: %d\n", 977 dev_err(codec_dai->dev,
975 codec_dai->name, err); 978 "ASoC: failed to remove %s: %d\n",
979 codec_dai->name, err);
976 } 980 }
977 codec_dai->probed = 0; 981 codec_dai->probed = 0;
978 list_del(&codec_dai->card_list); 982 list_del(&codec_dai->card_list);
@@ -984,8 +988,9 @@ static void soc_remove_link_dais(struct snd_soc_card *card, int num, int order)
984 if (cpu_dai->driver->remove) { 988 if (cpu_dai->driver->remove) {
985 err = cpu_dai->driver->remove(cpu_dai); 989 err = cpu_dai->driver->remove(cpu_dai);
986 if (err < 0) 990 if (err < 0)
987 pr_err("asoc: failed to remove %s: %d\n", 991 dev_err(cpu_dai->dev,
988 cpu_dai->name, err); 992 "ASoC: failed to remove %s: %d\n",
993 cpu_dai->name, err);
989 } 994 }
990 cpu_dai->probed = 0; 995 cpu_dai->probed = 0;
991 list_del(&cpu_dai->card_list); 996 list_del(&cpu_dai->card_list);
@@ -1099,8 +1104,7 @@ static int soc_probe_codec(struct snd_soc_card *card,
1099 ret = driver->probe(codec); 1104 ret = driver->probe(codec);
1100 if (ret < 0) { 1105 if (ret < 0) {
1101 dev_err(codec->dev, 1106 dev_err(codec->dev,
1102 "asoc: failed to probe CODEC %s: %d\n", 1107 "ASoC: failed to probe CODEC %d\n", ret);
1103 codec->name, ret);
1104 goto err_probe; 1108 goto err_probe;
1105 } 1109 }
1106 } 1110 }
@@ -1163,8 +1167,7 @@ static int soc_probe_platform(struct snd_soc_card *card,
1163 ret = driver->probe(platform); 1167 ret = driver->probe(platform);
1164 if (ret < 0) { 1168 if (ret < 0) {
1165 dev_err(platform->dev, 1169 dev_err(platform->dev,
1166 "asoc: failed to probe platform %s: %d\n", 1170 "ASoC: failed to probe platform %d\n", ret);
1167 platform->name, ret);
1168 goto err_probe; 1171 goto err_probe;
1169 } 1172 }
1170 } 1173 }
@@ -1229,7 +1232,7 @@ static int soc_post_component_init(struct snd_soc_card *card,
1229 else if (dailess && aux_dev->init) 1232 else if (dailess && aux_dev->init)
1230 ret = aux_dev->init(&codec->dapm); 1233 ret = aux_dev->init(&codec->dapm);
1231 if (ret < 0) { 1234 if (ret < 0) {
1232 dev_err(card->dev, "asoc: failed to init %s: %d\n", name, ret); 1235 dev_err(card->dev, "ASoC: failed to init %s: %d\n", name, ret);
1233 return ret; 1236 return ret;
1234 } 1237 }
1235 codec->name_prefix = temp; 1238 codec->name_prefix = temp;
@@ -1253,7 +1256,7 @@ static int soc_post_component_init(struct snd_soc_card *card,
1253 ret = device_add(rtd->dev); 1256 ret = device_add(rtd->dev);
1254 if (ret < 0) { 1257 if (ret < 0) {
1255 dev_err(card->dev, 1258 dev_err(card->dev,
1256 "asoc: failed to register runtime device: %d\n", ret); 1259 "ASoC: failed to register runtime device: %d\n", ret);
1257 return ret; 1260 return ret;
1258 } 1261 }
1259 rtd->dev_registered = 1; 1262 rtd->dev_registered = 1;
@@ -1262,14 +1265,13 @@ static int soc_post_component_init(struct snd_soc_card *card,
1262 ret = snd_soc_dapm_sys_add(rtd->dev); 1265 ret = snd_soc_dapm_sys_add(rtd->dev);
1263 if (ret < 0) 1266 if (ret < 0)
1264 dev_err(codec->dev, 1267 dev_err(codec->dev,
1265 "asoc: failed to add codec dapm sysfs entries: %d\n", 1268 "ASoC: failed to add codec dapm sysfs entries: %d\n", ret);
1266 ret);
1267 1269
1268 /* add codec sysfs entries */ 1270 /* add codec sysfs entries */
1269 ret = device_create_file(rtd->dev, &dev_attr_codec_reg); 1271 ret = device_create_file(rtd->dev, &dev_attr_codec_reg);
1270 if (ret < 0) 1272 if (ret < 0)
1271 dev_err(codec->dev, 1273 dev_err(codec->dev,
1272 "asoc: failed to add codec sysfs files: %d\n", ret); 1274 "ASoC: failed to add codec sysfs files: %d\n", ret);
1273 1275
1274#ifdef CONFIG_DEBUG_FS 1276#ifdef CONFIG_DEBUG_FS
1275 /* add DPCM sysfs entries */ 1277 /* add DPCM sysfs entries */
@@ -1278,7 +1280,7 @@ static int soc_post_component_init(struct snd_soc_card *card,
1278 1280
1279 ret = soc_dpcm_debugfs_add(rtd); 1281 ret = soc_dpcm_debugfs_add(rtd);
1280 if (ret < 0) 1282 if (ret < 0)
1281 dev_err(rtd->dev, "asoc: failed to add dpcm sysfs entries: %d\n", ret); 1283 dev_err(rtd->dev, "ASoC: failed to add dpcm sysfs entries: %d\n", ret);
1282 1284
1283out: 1285out:
1284#endif 1286#endif
@@ -1333,7 +1335,7 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
1333 struct snd_soc_dapm_widget *play_w, *capture_w; 1335 struct snd_soc_dapm_widget *play_w, *capture_w;
1334 int ret; 1336 int ret;
1335 1337
1336 dev_dbg(card->dev, "probe %s dai link %d late %d\n", 1338 dev_dbg(card->dev, "ASoC: probe %s dai link %d late %d\n",
1337 card->name, num, order); 1339 card->name, num, order);
1338 1340
1339 /* config components */ 1341 /* config components */
@@ -1359,8 +1361,9 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
1359 if (cpu_dai->driver->probe) { 1361 if (cpu_dai->driver->probe) {
1360 ret = cpu_dai->driver->probe(cpu_dai); 1362 ret = cpu_dai->driver->probe(cpu_dai);
1361 if (ret < 0) { 1363 if (ret < 0) {
1362 pr_err("asoc: failed to probe CPU DAI %s: %d\n", 1364 dev_err(cpu_dai->dev,
1363 cpu_dai->name, ret); 1365 "ASoC: failed to probe CPU DAI %s: %d\n",
1366 cpu_dai->name, ret);
1364 module_put(cpu_dai->dev->driver->owner); 1367 module_put(cpu_dai->dev->driver->owner);
1365 return ret; 1368 return ret;
1366 } 1369 }
@@ -1375,8 +1378,9 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
1375 if (codec_dai->driver->probe) { 1378 if (codec_dai->driver->probe) {
1376 ret = codec_dai->driver->probe(codec_dai); 1379 ret = codec_dai->driver->probe(codec_dai);
1377 if (ret < 0) { 1380 if (ret < 0) {
1378 pr_err("asoc: failed to probe CODEC DAI %s: %d\n", 1381 dev_err(codec_dai->dev,
1379 codec_dai->name, ret); 1382 "ASoC: failed to probe CODEC DAI %s: %d\n",
1383 codec_dai->name, ret);
1380 return ret; 1384 return ret;
1381 } 1385 }
1382 } 1386 }
@@ -1396,13 +1400,14 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
1396 1400
1397 ret = device_create_file(rtd->dev, &dev_attr_pmdown_time); 1401 ret = device_create_file(rtd->dev, &dev_attr_pmdown_time);
1398 if (ret < 0) 1402 if (ret < 0)
1399 pr_warn("asoc: failed to add pmdown_time sysfs:%d\n", ret); 1403 dev_warn(rtd->dev, "ASoC: failed to add pmdown_time sysfs: %d\n",
1404 ret);
1400 1405
1401 if (cpu_dai->driver->compress_dai) { 1406 if (cpu_dai->driver->compress_dai) {
1402 /*create compress_device"*/ 1407 /*create compress_device"*/
1403 ret = soc_new_compress(rtd, num); 1408 ret = soc_new_compress(rtd, num);
1404 if (ret < 0) { 1409 if (ret < 0) {
1405 pr_err("asoc: can't create compress %s\n", 1410 dev_err(card->dev, "ASoC: can't create compress %s\n",
1406 dai_link->stream_name); 1411 dai_link->stream_name);
1407 return ret; 1412 return ret;
1408 } 1413 }
@@ -1412,7 +1417,7 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
1412 /* create the pcm */ 1417 /* create the pcm */
1413 ret = soc_new_pcm(rtd, num); 1418 ret = soc_new_pcm(rtd, num);
1414 if (ret < 0) { 1419 if (ret < 0) {
1415 pr_err("asoc: can't create pcm %s :%d\n", 1420 dev_err(card->dev, "ASoC: can't create pcm %s :%d\n",
1416 dai_link->stream_name, ret); 1421 dai_link->stream_name, ret);
1417 return ret; 1422 return ret;
1418 } 1423 }
@@ -1424,7 +1429,7 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
1424 ret = snd_soc_dapm_new_pcm(card, dai_link->params, 1429 ret = snd_soc_dapm_new_pcm(card, dai_link->params,
1425 capture_w, play_w); 1430 capture_w, play_w);
1426 if (ret != 0) { 1431 if (ret != 0) {
1427 dev_err(card->dev, "Can't link %s to %s: %d\n", 1432 dev_err(card->dev, "ASoC: Can't link %s to %s: %d\n",
1428 play_w->name, capture_w->name, ret); 1433 play_w->name, capture_w->name, ret);
1429 return ret; 1434 return ret;
1430 } 1435 }
@@ -1436,7 +1441,7 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
1436 ret = snd_soc_dapm_new_pcm(card, dai_link->params, 1441 ret = snd_soc_dapm_new_pcm(card, dai_link->params,
1437 capture_w, play_w); 1442 capture_w, play_w);
1438 if (ret != 0) { 1443 if (ret != 0) {
1439 dev_err(card->dev, "Can't link %s to %s: %d\n", 1444 dev_err(card->dev, "ASoC: Can't link %s to %s: %d\n",
1440 play_w->name, capture_w->name, ret); 1445 play_w->name, capture_w->name, ret);
1441 return ret; 1446 return ret;
1442 } 1447 }
@@ -1473,7 +1478,8 @@ static int soc_register_ac97_dai_link(struct snd_soc_pcm_runtime *rtd)
1473 1478
1474 ret = soc_ac97_dev_register(rtd->codec); 1479 ret = soc_ac97_dev_register(rtd->codec);
1475 if (ret < 0) { 1480 if (ret < 0) {
1476 pr_err("asoc: AC97 device register failed:%d\n", ret); 1481 dev_err(rtd->codec->dev,
1482 "ASoC: AC97 device register failed: %d\n", ret);
1477 return ret; 1483 return ret;
1478 } 1484 }
1479 1485
@@ -1502,7 +1508,7 @@ static int soc_check_aux_dev(struct snd_soc_card *card, int num)
1502 return 0; 1508 return 0;
1503 } 1509 }
1504 1510
1505 dev_err(card->dev, "%s not registered\n", aux_dev->codec_name); 1511 dev_err(card->dev, "ASoC: %s not registered\n", aux_dev->codec_name);
1506 1512
1507 return -EPROBE_DEFER; 1513 return -EPROBE_DEFER;
1508} 1514}
@@ -1518,7 +1524,7 @@ static int soc_probe_aux_dev(struct snd_soc_card *card, int num)
1518 if (!strcmp(codec->name, aux_dev->codec_name)) { 1524 if (!strcmp(codec->name, aux_dev->codec_name)) {
1519 if (codec->probed) { 1525 if (codec->probed) {
1520 dev_err(codec->dev, 1526 dev_err(codec->dev,
1521 "asoc: codec already probed"); 1527 "ASoC: codec already probed");
1522 ret = -EBUSY; 1528 ret = -EBUSY;
1523 goto out; 1529 goto out;
1524 } 1530 }
@@ -1526,7 +1532,7 @@ static int soc_probe_aux_dev(struct snd_soc_card *card, int num)
1526 } 1532 }
1527 } 1533 }
1528 /* codec not found */ 1534 /* codec not found */
1529 dev_err(card->dev, "asoc: codec %s not found", aux_dev->codec_name); 1535 dev_err(card->dev, "ASoC: codec %s not found", aux_dev->codec_name);
1530 return -EPROBE_DEFER; 1536 return -EPROBE_DEFER;
1531 1537
1532found: 1538found:
@@ -1569,8 +1575,8 @@ static int snd_soc_init_codec_cache(struct snd_soc_codec *codec,
1569 codec->compress_type = compress_type; 1575 codec->compress_type = compress_type;
1570 ret = snd_soc_cache_init(codec); 1576 ret = snd_soc_cache_init(codec);
1571 if (ret < 0) { 1577 if (ret < 0) {
1572 dev_err(codec->dev, "Failed to set cache compression type: %d\n", 1578 dev_err(codec->dev, "ASoC: Failed to set cache compression"
1573 ret); 1579 " type: %d\n", ret);
1574 return ret; 1580 return ret;
1575 } 1581 }
1576 codec->cache_init = 1; 1582 codec->cache_init = 1;
@@ -1626,8 +1632,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1626 ret = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, 1632 ret = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
1627 card->owner, 0, &card->snd_card); 1633 card->owner, 0, &card->snd_card);
1628 if (ret < 0) { 1634 if (ret < 0) {
1629 pr_err("asoc: can't create sound card for card %s: %d\n", 1635 dev_err(card->dev, "ASoC: can't create sound card for"
1630 card->name, ret); 1636 " card %s: %d\n", card->name, ret);
1631 goto base_error; 1637 goto base_error;
1632 } 1638 }
1633 card->snd_card->dev = card->dev; 1639 card->snd_card->dev = card->dev;
@@ -1663,8 +1669,9 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1663 for (i = 0; i < card->num_links; i++) { 1669 for (i = 0; i < card->num_links; i++) {
1664 ret = soc_probe_link_components(card, i, order); 1670 ret = soc_probe_link_components(card, i, order);
1665 if (ret < 0) { 1671 if (ret < 0) {
1666 pr_err("asoc: failed to instantiate card %s: %d\n", 1672 dev_err(card->dev,
1667 card->name, ret); 1673 "ASoC: failed to instantiate card %d\n",
1674 ret);
1668 goto probe_dai_err; 1675 goto probe_dai_err;
1669 } 1676 }
1670 } 1677 }
@@ -1676,8 +1683,9 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1676 for (i = 0; i < card->num_links; i++) { 1683 for (i = 0; i < card->num_links; i++) {
1677 ret = soc_probe_link_dais(card, i, order); 1684 ret = soc_probe_link_dais(card, i, order);
1678 if (ret < 0) { 1685 if (ret < 0) {
1679 pr_err("asoc: failed to instantiate card %s: %d\n", 1686 dev_err(card->dev,
1680 card->name, ret); 1687 "ASoC: failed to instantiate card %d\n",
1688 ret);
1681 goto probe_dai_err; 1689 goto probe_dai_err;
1682 } 1690 }
1683 } 1691 }
@@ -1686,8 +1694,9 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1686 for (i = 0; i < card->num_aux_devs; i++) { 1694 for (i = 0; i < card->num_aux_devs; i++) {
1687 ret = soc_probe_aux_dev(card, i); 1695 ret = soc_probe_aux_dev(card, i);
1688 if (ret < 0) { 1696 if (ret < 0) {
1689 pr_err("asoc: failed to add auxiliary devices %s: %d\n", 1697 dev_err(card->dev,
1690 card->name, ret); 1698 "ASoC: failed to add auxiliary devices %d\n",
1699 ret);
1691 goto probe_aux_dev_err; 1700 goto probe_aux_dev_err;
1692 } 1701 }
1693 } 1702 }
@@ -1712,7 +1721,7 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1712 dai_fmt); 1721 dai_fmt);
1713 if (ret != 0 && ret != -ENOTSUPP) 1722 if (ret != 0 && ret != -ENOTSUPP)
1714 dev_warn(card->rtd[i].codec_dai->dev, 1723 dev_warn(card->rtd[i].codec_dai->dev,
1715 "Failed to set DAI format: %d\n", 1724 "ASoC: Failed to set DAI format: %d\n",
1716 ret); 1725 ret);
1717 } 1726 }
1718 1727
@@ -1723,7 +1732,7 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1723 dai_fmt); 1732 dai_fmt);
1724 if (ret != 0 && ret != -ENOTSUPP) 1733 if (ret != 0 && ret != -ENOTSUPP)
1725 dev_warn(card->rtd[i].cpu_dai->dev, 1734 dev_warn(card->rtd[i].cpu_dai->dev,
1726 "Failed to set DAI format: %d\n", 1735 "ASoC: Failed to set DAI format: %d\n",
1727 ret); 1736 ret);
1728 } else if (dai_fmt) { 1737 } else if (dai_fmt) {
1729 /* Flip the polarity for the "CPU" end */ 1738 /* Flip the polarity for the "CPU" end */
@@ -1748,7 +1757,7 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1748 dai_fmt); 1757 dai_fmt);
1749 if (ret != 0 && ret != -ENOTSUPP) 1758 if (ret != 0 && ret != -ENOTSUPP)
1750 dev_warn(card->rtd[i].cpu_dai->dev, 1759 dev_warn(card->rtd[i].cpu_dai->dev,
1751 "Failed to set DAI format: %d\n", 1760 "ASoC: Failed to set DAI format: %d\n",
1752 ret); 1761 ret);
1753 } 1762 }
1754 } 1763 }
@@ -1775,7 +1784,7 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1775 if (card->late_probe) { 1784 if (card->late_probe) {
1776 ret = card->late_probe(card); 1785 ret = card->late_probe(card);
1777 if (ret < 0) { 1786 if (ret < 0) {
1778 dev_err(card->dev, "%s late_probe() failed: %d\n", 1787 dev_err(card->dev, "ASoC: %s late_probe() failed: %d\n",
1779 card->name, ret); 1788 card->name, ret);
1780 goto probe_aux_dev_err; 1789 goto probe_aux_dev_err;
1781 } 1790 }
@@ -1789,8 +1798,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1789 1798
1790 ret = snd_card_register(card->snd_card); 1799 ret = snd_card_register(card->snd_card);
1791 if (ret < 0) { 1800 if (ret < 0) {
1792 pr_err("asoc: failed to register soundcard for %s: %d\n", 1801 dev_err(card->dev, "ASoC: failed to register soundcard %d\n",
1793 card->name, ret); 1802 ret);
1794 goto probe_aux_dev_err; 1803 goto probe_aux_dev_err;
1795 } 1804 }
1796 1805
@@ -1799,8 +1808,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1799 for (i = 0; i < card->num_rtd; i++) { 1808 for (i = 0; i < card->num_rtd; i++) {
1800 ret = soc_register_ac97_dai_link(&card->rtd[i]); 1809 ret = soc_register_ac97_dai_link(&card->rtd[i]);
1801 if (ret < 0) { 1810 if (ret < 0) {
1802 pr_err("asoc: failed to register AC97 %s: %d\n", 1811 dev_err(card->dev, "ASoC: failed to register AC97:"
1803 card->name, ret); 1812 " %d\n", ret);
1804 while (--i >= 0) 1813 while (--i >= 0)
1805 soc_unregister_ac97_dai_link(card->rtd[i].codec); 1814 soc_unregister_ac97_dai_link(card->rtd[i].codec);
1806 goto probe_aux_dev_err; 1815 goto probe_aux_dev_err;
@@ -1846,7 +1855,7 @@ static int soc_probe(struct platform_device *pdev)
1846 return -EINVAL; 1855 return -EINVAL;
1847 1856
1848 dev_warn(&pdev->dev, 1857 dev_warn(&pdev->dev,
1849 "ASoC machine %s should use snd_soc_register_card()\n", 1858 "ASoC: machine %s should use snd_soc_register_card()\n",
1850 card->name); 1859 card->name);
1851 1860
1852 /* Bodge while we unpick instantiation */ 1861 /* Bodge while we unpick instantiation */
@@ -1996,7 +2005,7 @@ int snd_soc_platform_read(struct snd_soc_platform *platform,
1996 unsigned int ret; 2005 unsigned int ret;
1997 2006
1998 if (!platform->driver->read) { 2007 if (!platform->driver->read) {
1999 dev_err(platform->dev, "platform has no read back\n"); 2008 dev_err(platform->dev, "ASoC: platform has no read back\n");
2000 return -1; 2009 return -1;
2001 } 2010 }
2002 2011
@@ -2012,7 +2021,7 @@ int snd_soc_platform_write(struct snd_soc_platform *platform,
2012 unsigned int reg, unsigned int val) 2021 unsigned int reg, unsigned int val)
2013{ 2022{
2014 if (!platform->driver->write) { 2023 if (!platform->driver->write) {
2015 dev_err(platform->dev, "platform has no write back\n"); 2024 dev_err(platform->dev, "ASoC: platform has no write back\n");
2016 return -1; 2025 return -1;
2017 } 2026 }
2018 2027
@@ -2283,7 +2292,8 @@ static int snd_soc_add_controls(struct snd_card *card, struct device *dev,
2283 err = snd_ctl_add(card, snd_soc_cnew(control, data, 2292 err = snd_ctl_add(card, snd_soc_cnew(control, data,
2284 control->name, prefix)); 2293 control->name, prefix));
2285 if (err < 0) { 2294 if (err < 0) {
2286 dev_err(dev, "Failed to add %s: %d\n", control->name, err); 2295 dev_err(dev, "ASoC: Failed to add %s: %d\n",
2296 control->name, err);
2287 return err; 2297 return err;
2288 } 2298 }
2289 } 2299 }
@@ -3534,15 +3544,14 @@ int snd_soc_register_card(struct snd_soc_card *card)
3534 * not both or neither. 3544 * not both or neither.
3535 */ 3545 */
3536 if (!!link->codec_name == !!link->codec_of_node) { 3546 if (!!link->codec_name == !!link->codec_of_node) {
3537 dev_err(card->dev, 3547 dev_err(card->dev, "ASoC: Neither/both codec"
3538 "Neither/both codec name/of_node are set for %s\n", 3548 " name/of_node are set for %s\n", link->name);
3539 link->name);
3540 return -EINVAL; 3549 return -EINVAL;
3541 } 3550 }
3542 /* Codec DAI name must be specified */ 3551 /* Codec DAI name must be specified */
3543 if (!link->codec_dai_name) { 3552 if (!link->codec_dai_name) {
3544 dev_err(card->dev, "codec_dai_name not set for %s\n", 3553 dev_err(card->dev, "ASoC: codec_dai_name not"
3545 link->name); 3554 " set for %s\n", link->name);
3546 return -EINVAL; 3555 return -EINVAL;
3547 } 3556 }
3548 3557
@@ -3551,8 +3560,8 @@ int snd_soc_register_card(struct snd_soc_card *card)
3551 * can be left unspecified, and a dummy platform will be used. 3560 * can be left unspecified, and a dummy platform will be used.
3552 */ 3561 */
3553 if (link->platform_name && link->platform_of_node) { 3562 if (link->platform_name && link->platform_of_node) {
3554 dev_err(card->dev, 3563 dev_err(card->dev, "ASoC: Both platform name/of_node"
3555 "Both platform name/of_node are set for %s\n", link->name); 3564 " are set for %s\n", link->name);
3556 return -EINVAL; 3565 return -EINVAL;
3557 } 3566 }
3558 3567
@@ -3562,9 +3571,8 @@ int snd_soc_register_card(struct snd_soc_card *card)
3562 * name alone.. 3571 * name alone..
3563 */ 3572 */
3564 if (link->cpu_name && link->cpu_of_node) { 3573 if (link->cpu_name && link->cpu_of_node) {
3565 dev_err(card->dev, 3574 dev_err(card->dev, "ASoC: Neither/both "
3566 "Neither/both cpu name/of_node are set for %s\n", 3575 "cpu name/of_node are set for %s\n",link->name);
3567 link->name);
3568 return -EINVAL; 3576 return -EINVAL;
3569 } 3577 }
3570 /* 3578 /*
@@ -3573,9 +3581,8 @@ int snd_soc_register_card(struct snd_soc_card *card)
3573 */ 3581 */
3574 if (!link->cpu_dai_name && 3582 if (!link->cpu_dai_name &&
3575 !(link->cpu_name || link->cpu_of_node)) { 3583 !(link->cpu_name || link->cpu_of_node)) {
3576 dev_err(card->dev, 3584 dev_err(card->dev, "ASoC: Neither cpu_dai_name nor "
3577 "Neither cpu_dai_name nor cpu_name/of_node are set for %s\n", 3585 "cpu_name/of_node are set for %s\n", link->name);
3578 link->name);
3579 return -EINVAL; 3586 return -EINVAL;
3580 } 3587 }
3581 } 3588 }
@@ -3622,7 +3629,7 @@ int snd_soc_unregister_card(struct snd_soc_card *card)
3622{ 3629{
3623 if (card->instantiated) 3630 if (card->instantiated)
3624 soc_cleanup_card_resources(card); 3631 soc_cleanup_card_resources(card);
3625 dev_dbg(card->dev, "Unregistered card '%s'\n", card->name); 3632 dev_dbg(card->dev, "ASoC: Unregistered card '%s'\n", card->name);
3626 3633
3627 return 0; 3634 return 0;
3628} 3635}
@@ -3679,8 +3686,8 @@ static inline char *fmt_multiple_name(struct device *dev,
3679 struct snd_soc_dai_driver *dai_drv) 3686 struct snd_soc_dai_driver *dai_drv)
3680{ 3687{
3681 if (dai_drv->name == NULL) { 3688 if (dai_drv->name == NULL) {
3682 pr_err("asoc: error - multiple DAI %s registered with no name\n", 3689 dev_err(dev, "ASoC: error - multiple DAI %s registered with"
3683 dev_name(dev)); 3690 " no name\n", dev_name(dev));
3684 return NULL; 3691 return NULL;
3685 } 3692 }
3686 3693
@@ -3698,7 +3705,7 @@ int snd_soc_register_dai(struct device *dev,
3698 struct snd_soc_codec *codec; 3705 struct snd_soc_codec *codec;
3699 struct snd_soc_dai *dai; 3706 struct snd_soc_dai *dai;
3700 3707
3701 dev_dbg(dev, "dai register %s\n", dev_name(dev)); 3708 dev_dbg(dev, "ASoC: dai register %s\n", dev_name(dev));
3702 3709
3703 dai = kzalloc(sizeof(struct snd_soc_dai), GFP_KERNEL); 3710 dai = kzalloc(sizeof(struct snd_soc_dai), GFP_KERNEL);
3704 if (dai == NULL) 3711 if (dai == NULL)
@@ -3721,7 +3728,7 @@ int snd_soc_register_dai(struct device *dev,
3721 3728
3722 list_for_each_entry(codec, &codec_list, list) { 3729 list_for_each_entry(codec, &codec_list, list) {
3723 if (codec->dev == dev) { 3730 if (codec->dev == dev) {
3724 dev_dbg(dev, "Mapped DAI %s to CODEC %s\n", 3731 dev_dbg(dev, "ASoC: Mapped DAI %s to CODEC %s\n",
3725 dai->name, codec->name); 3732 dai->name, codec->name);
3726 dai->codec = codec; 3733 dai->codec = codec;
3727 break; 3734 break;
@@ -3735,7 +3742,7 @@ int snd_soc_register_dai(struct device *dev,
3735 3742
3736 mutex_unlock(&client_mutex); 3743 mutex_unlock(&client_mutex);
3737 3744
3738 pr_debug("Registered DAI '%s'\n", dai->name); 3745 dev_dbg(dev, "ASoC: Registered DAI '%s'\n", dai->name);
3739 3746
3740 return 0; 3747 return 0;
3741} 3748}
@@ -3761,7 +3768,7 @@ found:
3761 list_del(&dai->list); 3768 list_del(&dai->list);
3762 mutex_unlock(&client_mutex); 3769 mutex_unlock(&client_mutex);
3763 3770
3764 pr_debug("Unregistered DAI '%s'\n", dai->name); 3771 dev_dbg(dev, "ASoC: Unregistered DAI '%s'\n", dai->name);
3765 kfree(dai->name); 3772 kfree(dai->name);
3766 kfree(dai); 3773 kfree(dai);
3767} 3774}
@@ -3780,7 +3787,7 @@ int snd_soc_register_dais(struct device *dev,
3780 struct snd_soc_dai *dai; 3787 struct snd_soc_dai *dai;
3781 int i, ret = 0; 3788 int i, ret = 0;
3782 3789
3783 dev_dbg(dev, "dai register %s #%Zu\n", dev_name(dev), count); 3790 dev_dbg(dev, "ASoC: dai register %s #%Zu\n", dev_name(dev), count);
3784 3791
3785 for (i = 0; i < count; i++) { 3792 for (i = 0; i < count; i++) {
3786 3793
@@ -3812,8 +3819,8 @@ int snd_soc_register_dais(struct device *dev,
3812 3819
3813 list_for_each_entry(codec, &codec_list, list) { 3820 list_for_each_entry(codec, &codec_list, list) {
3814 if (codec->dev == dev) { 3821 if (codec->dev == dev) {
3815 dev_dbg(dev, "Mapped DAI %s to CODEC %s\n", 3822 dev_dbg(dev, "ASoC: Mapped DAI %s to "
3816 dai->name, codec->name); 3823 "CODEC %s\n", dai->name, codec->name);
3817 dai->codec = codec; 3824 dai->codec = codec;
3818 break; 3825 break;
3819 } 3826 }
@@ -3826,7 +3833,7 @@ int snd_soc_register_dais(struct device *dev,
3826 3833
3827 mutex_unlock(&client_mutex); 3834 mutex_unlock(&client_mutex);
3828 3835
3829 pr_debug("Registered DAI '%s'\n", dai->name); 3836 dev_dbg(dai->dev, "ASoC: Registered DAI '%s'\n", dai->name);
3830 } 3837 }
3831 3838
3832 return 0; 3839 return 0;
@@ -3864,7 +3871,7 @@ int snd_soc_register_platform(struct device *dev,
3864{ 3871{
3865 struct snd_soc_platform *platform; 3872 struct snd_soc_platform *platform;
3866 3873
3867 dev_dbg(dev, "platform register %s\n", dev_name(dev)); 3874 dev_dbg(dev, "ASoC: platform register %s\n", dev_name(dev));
3868 3875
3869 platform = kzalloc(sizeof(struct snd_soc_platform), GFP_KERNEL); 3876 platform = kzalloc(sizeof(struct snd_soc_platform), GFP_KERNEL);
3870 if (platform == NULL) 3877 if (platform == NULL)
@@ -3888,7 +3895,7 @@ int snd_soc_register_platform(struct device *dev,
3888 list_add(&platform->list, &platform_list); 3895 list_add(&platform->list, &platform_list);
3889 mutex_unlock(&client_mutex); 3896 mutex_unlock(&client_mutex);
3890 3897
3891 pr_debug("Registered platform '%s'\n", platform->name); 3898 dev_dbg(dev, "ASoC: Registered platform '%s'\n", platform->name);
3892 3899
3893 return 0; 3900 return 0;
3894} 3901}
@@ -3914,7 +3921,7 @@ found:
3914 list_del(&platform->list); 3921 list_del(&platform->list);
3915 mutex_unlock(&client_mutex); 3922 mutex_unlock(&client_mutex);
3916 3923
3917 pr_debug("Unregistered platform '%s'\n", platform->name); 3924 dev_dbg(dev, "ASoC: Unregistered platform '%s'\n", platform->name);
3918 kfree(platform->name); 3925 kfree(platform->name);
3919 kfree(platform); 3926 kfree(platform);
3920} 3927}
@@ -4043,11 +4050,11 @@ int snd_soc_register_codec(struct device *dev,
4043 if (num_dai) { 4050 if (num_dai) {
4044 ret = snd_soc_register_dais(dev, dai_drv, num_dai); 4051 ret = snd_soc_register_dais(dev, dai_drv, num_dai);
4045 if (ret < 0) 4052 if (ret < 0)
4046 dev_err(codec->dev, "Failed to regster DAIs: %d\n", 4053 dev_err(codec->dev, "ASoC: Failed to regster"
4047 ret); 4054 " DAIs: %d\n", ret);
4048 } 4055 }
4049 4056
4050 pr_debug("Registered codec '%s'\n", codec->name); 4057 dev_dbg(codec->dev, "ASoC: Registered codec '%s'\n", codec->name);
4051 return 0; 4058 return 0;
4052 4059
4053fail: 4060fail:
@@ -4082,7 +4089,7 @@ found:
4082 list_del(&codec->list); 4089 list_del(&codec->list);
4083 mutex_unlock(&client_mutex); 4090 mutex_unlock(&client_mutex);
4084 4091
4085 pr_debug("Unregistered codec '%s'\n", codec->name); 4092 dev_dbg(codec->dev, "ASoC: Unregistered codec '%s'\n", codec->name);
4086 4093
4087 snd_soc_cache_exit(codec); 4094 snd_soc_cache_exit(codec);
4088 kfree(codec->reg_def_copy); 4095 kfree(codec->reg_def_copy);
@@ -4106,7 +4113,7 @@ int snd_soc_of_parse_card_name(struct snd_soc_card *card,
4106 */ 4113 */
4107 if (ret < 0 && ret != -EINVAL) { 4114 if (ret < 0 && ret != -EINVAL) {
4108 dev_err(card->dev, 4115 dev_err(card->dev,
4109 "Property '%s' could not be read: %d\n", 4116 "ASoC: Property '%s' could not be read: %d\n",
4110 propname, ret); 4117 propname, ret);
4111 return ret; 4118 return ret;
4112 } 4119 }
@@ -4125,15 +4132,13 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
4125 4132
4126 num_routes = of_property_count_strings(np, propname); 4133 num_routes = of_property_count_strings(np, propname);
4127 if (num_routes < 0 || num_routes & 1) { 4134 if (num_routes < 0 || num_routes & 1) {
4128 dev_err(card->dev, 4135 dev_err(card->dev, "ASoC: Property '%s' does not exist or its"
4129 "Property '%s' does not exist or its length is not even\n", 4136 " length is not even\n", propname);
4130 propname);
4131 return -EINVAL; 4137 return -EINVAL;
4132 } 4138 }
4133 num_routes /= 2; 4139 num_routes /= 2;
4134 if (!num_routes) { 4140 if (!num_routes) {
4135 dev_err(card->dev, 4141 dev_err(card->dev, "ASoC: Property '%s's length is zero\n",
4136 "Property '%s's length is zero\n",
4137 propname); 4142 propname);
4138 return -EINVAL; 4143 return -EINVAL;
4139 } 4144 }
@@ -4142,7 +4147,7 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
4142 GFP_KERNEL); 4147 GFP_KERNEL);
4143 if (!routes) { 4148 if (!routes) {
4144 dev_err(card->dev, 4149 dev_err(card->dev,
4145 "Could not allocate DAPM route table\n"); 4150 "ASoC: Could not allocate DAPM route table\n");
4146 return -EINVAL; 4151 return -EINVAL;
4147 } 4152 }
4148 4153
@@ -4150,9 +4155,9 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
4150 ret = of_property_read_string_index(np, propname, 4155 ret = of_property_read_string_index(np, propname,
4151 2 * i, &routes[i].sink); 4156 2 * i, &routes[i].sink);
4152 if (ret) { 4157 if (ret) {
4153 dev_err(card->dev, 4158 dev_err(card->dev, "ASoC: Property '%s' index %d"
4154 "Property '%s' index %d could not be read: %d\n", 4159 " could not be read: %d\n", propname, 2 * i,
4155 propname, 2 * i, ret); 4160 ret);
4156 kfree(routes); 4161 kfree(routes);
4157 return -EINVAL; 4162 return -EINVAL;
4158 } 4163 }
@@ -4160,8 +4165,8 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
4160 (2 * i) + 1, &routes[i].source); 4165 (2 * i) + 1, &routes[i].source);
4161 if (ret) { 4166 if (ret) {
4162 dev_err(card->dev, 4167 dev_err(card->dev,
4163 "Property '%s' index %d could not be read: %d\n", 4168 "ASoC: Property '%s' index %d could not be"
4164 propname, (2 * i) + 1, ret); 4169 " read: %d\n", propname, (2 * i) + 1, ret);
4165 kfree(routes); 4170 kfree(routes);
4166 return -EINVAL; 4171 return -EINVAL;
4167 } 4172 }