aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ac97.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/ac97.c')
-rw-r--r--sound/soc/codecs/ac97.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c
index 300d007f2339..e4516f3ce64c 100644
--- a/sound/soc/codecs/ac97.c
+++ b/sound/soc/codecs/ac97.c
@@ -144,9 +144,34 @@ static int ac97_soc_remove(struct platform_device *pdev)
144 return 0; 144 return 0;
145} 145}
146 146
147#ifdef CONFIG_PM
148static int ac97_soc_suspend(struct platform_device *pdev, pm_message_t msg)
149{
150 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
151
152 snd_ac97_suspend(socdev->codec->ac97);
153
154 return 0;
155}
156
157static int ac97_soc_resume(struct platform_device *pdev)
158{
159 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
160
161 snd_ac97_resume(socdev->codec->ac97);
162
163 return 0;
164}
165#else
166#define ac97_soc_suspend NULL
167#define ac97_soc_resume NULL
168#endif
169
147struct snd_soc_codec_device soc_codec_dev_ac97 = { 170struct snd_soc_codec_device soc_codec_dev_ac97 = {
148 .probe = ac97_soc_probe, 171 .probe = ac97_soc_probe,
149 .remove = ac97_soc_remove, 172 .remove = ac97_soc_remove,
173 .suspend = ac97_soc_suspend,
174 .resume = ac97_soc_resume,
150}; 175};
151EXPORT_SYMBOL_GPL(soc_codec_dev_ac97); 176EXPORT_SYMBOL_GPL(soc_codec_dev_ac97);
152 177