aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-03-12 10:27:40 -0400
committerMark Brown <broonie@linaro.org>2014-03-25 08:52:42 -0400
commit6479f15ad7227da99b4bfc2a465cc50a28ff1b5a (patch)
treefbc598f3a21859f5b1f20102dd5eba3edb5885b6 /sound/soc
parente090d5b6ad20056ec0ef58727e3ae95fd82be090 (diff)
ASoC: Remove name_prefix unset during DAI link init hack
Before we had card level support for DAPM and controls machine drivers would register their controls and DAPM elements with the CODEC. This required us to temporarily unset the name_prefix of a CODEC during the rtd init callback to avoid the machine level controls getting the CODEC's prefix. Now that all machine drivers properly register their machine level controls and DAPM elements with the card rather than with the CODEC we can drop the hack that sets the CODEC's name_prefix to NULL while calling the DAI link or AUX dev init callback. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b322cf294d06..daca4b7de45c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1253,7 +1253,7 @@ static int soc_post_component_init(struct snd_soc_card *card,
1253 struct snd_soc_dai_link *dai_link = NULL; 1253 struct snd_soc_dai_link *dai_link = NULL;
1254 struct snd_soc_aux_dev *aux_dev = NULL; 1254 struct snd_soc_aux_dev *aux_dev = NULL;
1255 struct snd_soc_pcm_runtime *rtd; 1255 struct snd_soc_pcm_runtime *rtd;
1256 const char *temp, *name; 1256 const char *name;
1257 int ret = 0; 1257 int ret = 0;
1258 1258
1259 if (!dailess) { 1259 if (!dailess) {
@@ -1267,10 +1267,6 @@ static int soc_post_component_init(struct snd_soc_card *card,
1267 } 1267 }
1268 rtd->card = card; 1268 rtd->card = card;
1269 1269
1270 /* machine controls, routes and widgets are not prefixed */
1271 temp = codec->name_prefix;
1272 codec->name_prefix = NULL;
1273
1274 /* do machine specific initialization */ 1270 /* do machine specific initialization */
1275 if (!dailess && dai_link->init) 1271 if (!dailess && dai_link->init)
1276 ret = dai_link->init(rtd); 1272 ret = dai_link->init(rtd);
@@ -1280,7 +1276,6 @@ static int soc_post_component_init(struct snd_soc_card *card,
1280 dev_err(card->dev, "ASoC: failed to init %s: %d\n", name, ret); 1276 dev_err(card->dev, "ASoC: failed to init %s: %d\n", name, ret);
1281 return ret; 1277 return ret;
1282 } 1278 }
1283 codec->name_prefix = temp;
1284 1279
1285 /* register the rtd device */ 1280 /* register the rtd device */
1286 rtd->codec = codec; 1281 rtd->codec = codec;