aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-26 09:05:25 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-27 06:55:53 -0500
commit70b2ac126a60c87145ae8a8eb1b4dccaa0bf5468 (patch)
tree314a435bc3753194b6abcf63ce7721810729f841 /sound/soc/soc-core.c
parent16af7d60aa27d3fc39e46fd456b8e33d34d60437 (diff)
ASoC: Use card rather than soc-audio device to card PM functions
The platform device for the card is tied closely to the soc-audio implementation which we're currently trying to remove in favour of allowing cards to have their own devices. Begin removing it by replacing it with the card in the suspend and resume callbacks we give to cards, also taking the opportunity to remove the legacy suspend types which are currently hard coded anyway. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 14861f95f629..446838e7d3ec 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1011,7 +1011,7 @@ static int soc_suspend(struct device *dev)
1011 } 1011 }
1012 1012
1013 if (card->suspend_pre) 1013 if (card->suspend_pre)
1014 card->suspend_pre(pdev, PMSG_SUSPEND); 1014 card->suspend_pre(card);
1015 1015
1016 for (i = 0; i < card->num_rtd; i++) { 1016 for (i = 0; i < card->num_rtd; i++) {
1017 struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai; 1017 struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai;
@@ -1078,7 +1078,7 @@ static int soc_suspend(struct device *dev)
1078 } 1078 }
1079 1079
1080 if (card->suspend_post) 1080 if (card->suspend_post)
1081 card->suspend_post(pdev, PMSG_SUSPEND); 1081 card->suspend_post(card);
1082 1082
1083 return 0; 1083 return 0;
1084} 1084}
@@ -1090,7 +1090,6 @@ static void soc_resume_deferred(struct work_struct *work)
1090{ 1090{
1091 struct snd_soc_card *card = 1091 struct snd_soc_card *card =
1092 container_of(work, struct snd_soc_card, deferred_resume_work); 1092 container_of(work, struct snd_soc_card, deferred_resume_work);
1093 struct platform_device *pdev = to_platform_device(card->dev);
1094 struct snd_soc_codec *codec; 1093 struct snd_soc_codec *codec;
1095 int i; 1094 int i;
1096 1095
@@ -1104,7 +1103,7 @@ static void soc_resume_deferred(struct work_struct *work)
1104 snd_power_change_state(card->snd_card, SNDRV_CTL_POWER_D2); 1103 snd_power_change_state(card->snd_card, SNDRV_CTL_POWER_D2);
1105 1104
1106 if (card->resume_pre) 1105 if (card->resume_pre)
1107 card->resume_pre(pdev); 1106 card->resume_pre(card);
1108 1107
1109 /* resume AC97 DAIs */ 1108 /* resume AC97 DAIs */
1110 for (i = 0; i < card->num_rtd; i++) { 1109 for (i = 0; i < card->num_rtd; i++) {
@@ -1179,7 +1178,7 @@ static void soc_resume_deferred(struct work_struct *work)
1179 } 1178 }
1180 1179
1181 if (card->resume_post) 1180 if (card->resume_post)
1182 card->resume_post(pdev); 1181 card->resume_post(card);
1183 1182
1184 dev_dbg(card->dev, "resume work completed\n"); 1183 dev_dbg(card->dev, "resume work completed\n");
1185 1184