aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-08-19 09:51:23 -0400
committerMark Brown <broonie@linaro.org>2014-08-19 11:59:46 -0400
commit57bf772687700e206c760ba2e4097f78bde97887 (patch)
treee561664b7ac4e362ae8dac17ec33c57aeec86594
parent65d9361f0cb50a20641802ee3075145d72e4409c (diff)
ASoC: Pass component instead of DAPM context to AUX dev init callback
Given that the component is the containing structure it makes more sense to pass the component rather than the DAPM context to the AUX dev init callback. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--include/sound/soc.h2
-rw-r--r--sound/soc/samsung/speyside.c6
-rw-r--r--sound/soc/soc-core.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index fbc2ad840244..3a0031e1f9b4 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1022,7 +1022,7 @@ struct snd_soc_aux_dev {
1022 const struct device_node *codec_of_node; 1022 const struct device_node *codec_of_node;
1023 1023
1024 /* codec/machine specific init - e.g. add machine controls */ 1024 /* codec/machine specific init - e.g. add machine controls */
1025 int (*init)(struct snd_soc_dapm_context *dapm); 1025 int (*init)(struct snd_soc_component *component);
1026}; 1026};
1027 1027
1028/* SoC card */ 1028/* SoC card */
diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c
index 9902efcb8ea1..a05482651aae 100644
--- a/sound/soc/samsung/speyside.c
+++ b/sound/soc/samsung/speyside.c
@@ -228,10 +228,12 @@ static struct snd_soc_dai_link speyside_dai[] = {
228 }, 228 },
229}; 229};
230 230
231static int speyside_wm9081_init(struct snd_soc_dapm_context *dapm) 231static int speyside_wm9081_init(struct snd_soc_component *component)
232{ 232{
233 struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
234
233 /* At any time the WM9081 is active it will have this clock */ 235 /* At any time the WM9081 is active it will have this clock */
234 return snd_soc_codec_set_sysclk(dapm->codec, WM9081_SYSCLK_MCLK, 0, 236 return snd_soc_codec_set_sysclk(codec, WM9081_SYSCLK_MCLK, 0,
235 MCLK_AUDIO_RATE, 0); 237 MCLK_AUDIO_RATE, 0);
236} 238}
237 239
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 08c04f4c7e62..4393bc33d3af 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1632,7 +1632,7 @@ static int soc_probe_aux_dev(struct snd_soc_card *card, int num)
1632 1632
1633 /* do machine specific initialization */ 1633 /* do machine specific initialization */
1634 if (aux_dev->init) { 1634 if (aux_dev->init) {
1635 ret = aux_dev->init(snd_soc_component_get_dapm(rtd->component)); 1635 ret = aux_dev->init(rtd->component);
1636 if (ret < 0) { 1636 if (ret < 0) {
1637 dev_err(card->dev, "ASoC: failed to init %s: %d\n", 1637 dev_err(card->dev, "ASoC: failed to init %s: %d\n",
1638 aux_dev->name, ret); 1638 aux_dev->name, ret);