aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-03-02 13:17:32 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-03-03 06:14:55 -0500
commit12ea2c782e8bd98bcbf88165b2fd1610d1b9a81d (patch)
tree59dcbe07bcbee7438bcb5973dc189eb5099c34b1 /sound/soc/soc-dapm.c
parent1916a2aae52b8cb8f992599204ce06c0accd08e2 (diff)
ASoC: Get the card directly from the DAPM context
Rather than indirecting through the CODEC we can look the card up directly from the card pointer in the DAPM context. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index b8e6ab739def..8240ab853d78 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -368,7 +368,7 @@ static int dapm_new_mixer(struct snd_soc_dapm_context *dapm,
368 int i, ret = 0; 368 int i, ret = 0;
369 size_t name_len; 369 size_t name_len;
370 struct snd_soc_dapm_path *path; 370 struct snd_soc_dapm_path *path;
371 struct snd_card *card = dapm->codec->card->snd_card; 371 struct snd_card *card = dapm->card->snd_card;
372 372
373 /* add kcontrol */ 373 /* add kcontrol */
374 for (i = 0; i < w->num_kcontrols; i++) { 374 for (i = 0; i < w->num_kcontrols; i++) {
@@ -430,7 +430,7 @@ static int dapm_new_mux(struct snd_soc_dapm_context *dapm,
430{ 430{
431 struct snd_soc_dapm_path *path = NULL; 431 struct snd_soc_dapm_path *path = NULL;
432 struct snd_kcontrol *kcontrol; 432 struct snd_kcontrol *kcontrol;
433 struct snd_card *card = dapm->codec->card->snd_card; 433 struct snd_card *card = dapm->card->snd_card;
434 int ret = 0; 434 int ret = 0;
435 435
436 if (!w->num_kcontrols) { 436 if (!w->num_kcontrols) {
@@ -480,7 +480,7 @@ static inline void dapm_clear_walk(struct snd_soc_dapm_context *dapm)
480 */ 480 */
481static int snd_soc_dapm_suspend_check(struct snd_soc_dapm_widget *widget) 481static int snd_soc_dapm_suspend_check(struct snd_soc_dapm_widget *widget)
482{ 482{
483 int level = snd_power_get_state(widget->dapm->codec->card->snd_card); 483 int level = snd_power_get_state(widget->dapm->card->snd_card);
484 484
485 switch (level) { 485 switch (level) {
486 case SNDRV_CTL_POWER_D3hot: 486 case SNDRV_CTL_POWER_D3hot:
@@ -1083,7 +1083,7 @@ static void dapm_post_sequence_async(void *data, async_cookie_t cookie)
1083 */ 1083 */
1084static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) 1084static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
1085{ 1085{
1086 struct snd_soc_card *card = dapm->codec->card; 1086 struct snd_soc_card *card = dapm->card;
1087 struct snd_soc_dapm_widget *w; 1087 struct snd_soc_dapm_widget *w;
1088 struct snd_soc_dapm_context *d; 1088 struct snd_soc_dapm_context *d;
1089 LIST_HEAD(up_list); 1089 LIST_HEAD(up_list);