diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/arm/pxa2xx-ac97.c | 9 | ||||
-rw-r--r-- | sound/atmel/abdac.c | 17 | ||||
-rw-r--r-- | sound/atmel/ac97c.c | 17 | ||||
-rw-r--r-- | sound/drivers/aloop.c | 19 | ||||
-rw-r--r-- | sound/drivers/dummy.c | 18 | ||||
-rw-r--r-- | sound/drivers/pcsp/pcsp.c | 11 | ||||
-rw-r--r-- | sound/ppc/powermac.c | 18 |
7 files changed, 58 insertions, 51 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index afef72c4f0d3..0d7b25e81643 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c | |||
@@ -108,7 +108,7 @@ static struct pxa2xx_pcm_client pxa2xx_ac97_pcm_client = { | |||
108 | 108 | ||
109 | #ifdef CONFIG_PM | 109 | #ifdef CONFIG_PM |
110 | 110 | ||
111 | static int pxa2xx_ac97_do_suspend(struct snd_card *card, pm_message_t state) | 111 | static int pxa2xx_ac97_do_suspend(struct snd_card *card) |
112 | { | 112 | { |
113 | pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data; | 113 | pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data; |
114 | 114 | ||
@@ -144,7 +144,7 @@ static int pxa2xx_ac97_suspend(struct device *dev) | |||
144 | int ret = 0; | 144 | int ret = 0; |
145 | 145 | ||
146 | if (card) | 146 | if (card) |
147 | ret = pxa2xx_ac97_do_suspend(card, PMSG_SUSPEND); | 147 | ret = pxa2xx_ac97_do_suspend(card); |
148 | 148 | ||
149 | return ret; | 149 | return ret; |
150 | } | 150 | } |
@@ -160,10 +160,7 @@ static int pxa2xx_ac97_resume(struct device *dev) | |||
160 | return ret; | 160 | return ret; |
161 | } | 161 | } |
162 | 162 | ||
163 | static const struct dev_pm_ops pxa2xx_ac97_pm_ops = { | 163 | static SIMPLE_DEV_PM_OPS(pxa2xx_ac97_pm_ops, pxa2xx_ac97_suspend, pxa2xx_ac97_resume); |
164 | .suspend = pxa2xx_ac97_suspend, | ||
165 | .resume = pxa2xx_ac97_resume, | ||
166 | }; | ||
167 | #endif | 164 | #endif |
168 | 165 | ||
169 | static int __devinit pxa2xx_ac97_probe(struct platform_device *dev) | 166 | static int __devinit pxa2xx_ac97_probe(struct platform_device *dev) |
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c index 2e866398bffe..eb4ceb71123e 100644 --- a/sound/atmel/abdac.c +++ b/sound/atmel/abdac.c | |||
@@ -535,9 +535,9 @@ out_put_pclk: | |||
535 | } | 535 | } |
536 | 536 | ||
537 | #ifdef CONFIG_PM | 537 | #ifdef CONFIG_PM |
538 | static int atmel_abdac_suspend(struct platform_device *pdev, pm_message_t msg) | 538 | static int atmel_abdac_suspend(struct device *pdev) |
539 | { | 539 | { |
540 | struct snd_card *card = platform_get_drvdata(pdev); | 540 | struct snd_card *card = dev_get_drvdata(pdev); |
541 | struct atmel_abdac *dac = card->private_data; | 541 | struct atmel_abdac *dac = card->private_data; |
542 | 542 | ||
543 | dw_dma_cyclic_stop(dac->dma.chan); | 543 | dw_dma_cyclic_stop(dac->dma.chan); |
@@ -547,9 +547,9 @@ static int atmel_abdac_suspend(struct platform_device *pdev, pm_message_t msg) | |||
547 | return 0; | 547 | return 0; |
548 | } | 548 | } |
549 | 549 | ||
550 | static int atmel_abdac_resume(struct platform_device *pdev) | 550 | static int atmel_abdac_resume(struct device *pdev) |
551 | { | 551 | { |
552 | struct snd_card *card = platform_get_drvdata(pdev); | 552 | struct snd_card *card = dev_get_drvdata(pdev); |
553 | struct atmel_abdac *dac = card->private_data; | 553 | struct atmel_abdac *dac = card->private_data; |
554 | 554 | ||
555 | clk_enable(dac->pclk); | 555 | clk_enable(dac->pclk); |
@@ -559,9 +559,11 @@ static int atmel_abdac_resume(struct platform_device *pdev) | |||
559 | 559 | ||
560 | return 0; | 560 | return 0; |
561 | } | 561 | } |
562 | |||
563 | static SIMPLE_DEV_PM_OPS(atmel_abdac_pm, atmel_abdac_suspend, atmel_abdac_resume); | ||
564 | #define ATMEL_ABDAC_PM_OPS &atmel_abdac_pm | ||
562 | #else | 565 | #else |
563 | #define atmel_abdac_suspend NULL | 566 | #define ATMEL_ABDAC_PM_OPS NULL |
564 | #define atmel_abdac_resume NULL | ||
565 | #endif | 567 | #endif |
566 | 568 | ||
567 | static int __devexit atmel_abdac_remove(struct platform_device *pdev) | 569 | static int __devexit atmel_abdac_remove(struct platform_device *pdev) |
@@ -590,9 +592,8 @@ static struct platform_driver atmel_abdac_driver = { | |||
590 | .driver = { | 592 | .driver = { |
591 | .name = "atmel_abdac", | 593 | .name = "atmel_abdac", |
592 | .owner = THIS_MODULE, | 594 | .owner = THIS_MODULE, |
595 | .pm = ATMEL_ABDAC_PM_OPS, | ||
593 | }, | 596 | }, |
594 | .suspend = atmel_abdac_suspend, | ||
595 | .resume = atmel_abdac_resume, | ||
596 | }; | 597 | }; |
597 | 598 | ||
598 | static int __init atmel_abdac_init(void) | 599 | static int __init atmel_abdac_init(void) |
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 3d0ea82ff068..bf47025bdf45 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c | |||
@@ -1135,9 +1135,9 @@ err_snd_card_new: | |||
1135 | } | 1135 | } |
1136 | 1136 | ||
1137 | #ifdef CONFIG_PM | 1137 | #ifdef CONFIG_PM |
1138 | static int atmel_ac97c_suspend(struct platform_device *pdev, pm_message_t msg) | 1138 | static int atmel_ac97c_suspend(struct device *pdev) |
1139 | { | 1139 | { |
1140 | struct snd_card *card = platform_get_drvdata(pdev); | 1140 | struct snd_card *card = dev_get_drvdata(pdev); |
1141 | struct atmel_ac97c *chip = card->private_data; | 1141 | struct atmel_ac97c *chip = card->private_data; |
1142 | 1142 | ||
1143 | if (cpu_is_at32ap7000()) { | 1143 | if (cpu_is_at32ap7000()) { |
@@ -1151,9 +1151,9 @@ static int atmel_ac97c_suspend(struct platform_device *pdev, pm_message_t msg) | |||
1151 | return 0; | 1151 | return 0; |
1152 | } | 1152 | } |
1153 | 1153 | ||
1154 | static int atmel_ac97c_resume(struct platform_device *pdev) | 1154 | static int atmel_ac97c_resume(struct device *pdev) |
1155 | { | 1155 | { |
1156 | struct snd_card *card = platform_get_drvdata(pdev); | 1156 | struct snd_card *card = dev_get_drvdata(pdev); |
1157 | struct atmel_ac97c *chip = card->private_data; | 1157 | struct atmel_ac97c *chip = card->private_data; |
1158 | 1158 | ||
1159 | clk_enable(chip->pclk); | 1159 | clk_enable(chip->pclk); |
@@ -1165,9 +1165,11 @@ static int atmel_ac97c_resume(struct platform_device *pdev) | |||
1165 | } | 1165 | } |
1166 | return 0; | 1166 | return 0; |
1167 | } | 1167 | } |
1168 | |||
1169 | static SIMPLE_DEV_PM_OPS(atmel_ac97c_pm, atmel_ac97c_suspend, atmel_ac97c_resume); | ||
1170 | #define ATMEL_AC97C_PM_OPS &atmel_ac97c_pm | ||
1168 | #else | 1171 | #else |
1169 | #define atmel_ac97c_suspend NULL | 1172 | #define ATMEL_AC97C_PM_OPS NULL |
1170 | #define atmel_ac97c_resume NULL | ||
1171 | #endif | 1173 | #endif |
1172 | 1174 | ||
1173 | static int __devexit atmel_ac97c_remove(struct platform_device *pdev) | 1175 | static int __devexit atmel_ac97c_remove(struct platform_device *pdev) |
@@ -1211,9 +1213,8 @@ static struct platform_driver atmel_ac97c_driver = { | |||
1211 | .driver = { | 1213 | .driver = { |
1212 | .name = "atmel_ac97c", | 1214 | .name = "atmel_ac97c", |
1213 | .owner = THIS_MODULE, | 1215 | .owner = THIS_MODULE, |
1216 | .pm = ATMEL_AC97C_PM_OPS, | ||
1214 | }, | 1217 | }, |
1215 | .suspend = atmel_ac97c_suspend, | ||
1216 | .resume = atmel_ac97c_resume, | ||
1217 | }; | 1218 | }; |
1218 | 1219 | ||
1219 | static int __init atmel_ac97c_init(void) | 1220 | static int __init atmel_ac97c_init(void) |
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index 3484411bd5e6..1128b35b2b05 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c | |||
@@ -1177,10 +1177,9 @@ static int __devexit loopback_remove(struct platform_device *devptr) | |||
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | #ifdef CONFIG_PM | 1179 | #ifdef CONFIG_PM |
1180 | static int loopback_suspend(struct platform_device *pdev, | 1180 | static int loopback_suspend(struct device *pdev) |
1181 | pm_message_t state) | ||
1182 | { | 1181 | { |
1183 | struct snd_card *card = platform_get_drvdata(pdev); | 1182 | struct snd_card *card = dev_get_drvdata(pdev); |
1184 | struct loopback *loopback = card->private_data; | 1183 | struct loopback *loopback = card->private_data; |
1185 | 1184 | ||
1186 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 1185 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
@@ -1190,13 +1189,18 @@ static int loopback_suspend(struct platform_device *pdev, | |||
1190 | return 0; | 1189 | return 0; |
1191 | } | 1190 | } |
1192 | 1191 | ||
1193 | static int loopback_resume(struct platform_device *pdev) | 1192 | static int loopback_resume(struct device *pdev) |
1194 | { | 1193 | { |
1195 | struct snd_card *card = platform_get_drvdata(pdev); | 1194 | struct snd_card *card = dev_get_drvdata(pdev); |
1196 | 1195 | ||
1197 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | 1196 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
1198 | return 0; | 1197 | return 0; |
1199 | } | 1198 | } |
1199 | |||
1200 | static SIMPLE_DEV_PM_OPS(loopback_pm, loopback_suspend, loopback_resume); | ||
1201 | #define LOOPBACK_PM_OPS &loopback_pm | ||
1202 | #else | ||
1203 | #define LOOPBACK_PM_OPS NULL | ||
1200 | #endif | 1204 | #endif |
1201 | 1205 | ||
1202 | #define SND_LOOPBACK_DRIVER "snd_aloop" | 1206 | #define SND_LOOPBACK_DRIVER "snd_aloop" |
@@ -1204,13 +1208,10 @@ static int loopback_resume(struct platform_device *pdev) | |||
1204 | static struct platform_driver loopback_driver = { | 1208 | static struct platform_driver loopback_driver = { |
1205 | .probe = loopback_probe, | 1209 | .probe = loopback_probe, |
1206 | .remove = __devexit_p(loopback_remove), | 1210 | .remove = __devexit_p(loopback_remove), |
1207 | #ifdef CONFIG_PM | ||
1208 | .suspend = loopback_suspend, | ||
1209 | .resume = loopback_resume, | ||
1210 | #endif | ||
1211 | .driver = { | 1211 | .driver = { |
1212 | .name = SND_LOOPBACK_DRIVER, | 1212 | .name = SND_LOOPBACK_DRIVER, |
1213 | .owner = THIS_MODULE, | 1213 | .owner = THIS_MODULE, |
1214 | .pm = LOOPBACK_PM_OPS, | ||
1214 | }, | 1215 | }, |
1215 | }; | 1216 | }; |
1216 | 1217 | ||
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index bc79c441a8f2..f7d3bfc6bca8 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c | |||
@@ -1065,9 +1065,9 @@ static int __devexit snd_dummy_remove(struct platform_device *devptr) | |||
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | #ifdef CONFIG_PM | 1067 | #ifdef CONFIG_PM |
1068 | static int snd_dummy_suspend(struct platform_device *pdev, pm_message_t state) | 1068 | static int snd_dummy_suspend(struct device *pdev) |
1069 | { | 1069 | { |
1070 | struct snd_card *card = platform_get_drvdata(pdev); | 1070 | struct snd_card *card = dev_get_drvdata(pdev); |
1071 | struct snd_dummy *dummy = card->private_data; | 1071 | struct snd_dummy *dummy = card->private_data; |
1072 | 1072 | ||
1073 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 1073 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
@@ -1075,13 +1075,18 @@ static int snd_dummy_suspend(struct platform_device *pdev, pm_message_t state) | |||
1075 | return 0; | 1075 | return 0; |
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | static int snd_dummy_resume(struct platform_device *pdev) | 1078 | static int snd_dummy_resume(struct device *pdev) |
1079 | { | 1079 | { |
1080 | struct snd_card *card = platform_get_drvdata(pdev); | 1080 | struct snd_card *card = dev_get_drvdata(pdev); |
1081 | 1081 | ||
1082 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | 1082 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
1083 | return 0; | 1083 | return 0; |
1084 | } | 1084 | } |
1085 | |||
1086 | static SIMPLE_DEV_PM_OPS(snd_dummy_pm, snd_dummy_suspend, snd_dummy_resume); | ||
1087 | #define SND_DUMMY_PM_OPS &snd_dummy_pm | ||
1088 | #else | ||
1089 | #define SND_DUMMY_PM_OPS NULL | ||
1085 | #endif | 1090 | #endif |
1086 | 1091 | ||
1087 | #define SND_DUMMY_DRIVER "snd_dummy" | 1092 | #define SND_DUMMY_DRIVER "snd_dummy" |
@@ -1089,13 +1094,10 @@ static int snd_dummy_resume(struct platform_device *pdev) | |||
1089 | static struct platform_driver snd_dummy_driver = { | 1094 | static struct platform_driver snd_dummy_driver = { |
1090 | .probe = snd_dummy_probe, | 1095 | .probe = snd_dummy_probe, |
1091 | .remove = __devexit_p(snd_dummy_remove), | 1096 | .remove = __devexit_p(snd_dummy_remove), |
1092 | #ifdef CONFIG_PM | ||
1093 | .suspend = snd_dummy_suspend, | ||
1094 | .resume = snd_dummy_resume, | ||
1095 | #endif | ||
1096 | .driver = { | 1097 | .driver = { |
1097 | .name = SND_DUMMY_DRIVER, | 1098 | .name = SND_DUMMY_DRIVER, |
1098 | .owner = THIS_MODULE, | 1099 | .owner = THIS_MODULE, |
1100 | .pm = SND_DUMMY_PM_OPS, | ||
1099 | }, | 1101 | }, |
1100 | }; | 1102 | }; |
1101 | 1103 | ||
diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c index 99704e6a2e26..6ca59fc6dcb9 100644 --- a/sound/drivers/pcsp/pcsp.c +++ b/sound/drivers/pcsp/pcsp.c | |||
@@ -200,15 +200,18 @@ static void pcsp_stop_beep(struct snd_pcsp *chip) | |||
200 | } | 200 | } |
201 | 201 | ||
202 | #ifdef CONFIG_PM | 202 | #ifdef CONFIG_PM |
203 | static int pcsp_suspend(struct platform_device *dev, pm_message_t state) | 203 | static int pcsp_suspend(struct device *dev) |
204 | { | 204 | { |
205 | struct snd_pcsp *chip = platform_get_drvdata(dev); | 205 | struct snd_pcsp *chip = dev_get_drvdata(dev); |
206 | pcsp_stop_beep(chip); | 206 | pcsp_stop_beep(chip); |
207 | snd_pcm_suspend_all(chip->pcm); | 207 | snd_pcm_suspend_all(chip->pcm); |
208 | return 0; | 208 | return 0; |
209 | } | 209 | } |
210 | |||
211 | static SIMPLE_DEV_PM_OPS(pcsp_pm, pcsp_suspend, NULL); | ||
212 | #define PCSP_PM_OPS &pcsp_pm | ||
210 | #else | 213 | #else |
211 | #define pcsp_suspend NULL | 214 | #define PCSP_PM_OPS NULL |
212 | #endif /* CONFIG_PM */ | 215 | #endif /* CONFIG_PM */ |
213 | 216 | ||
214 | static void pcsp_shutdown(struct platform_device *dev) | 217 | static void pcsp_shutdown(struct platform_device *dev) |
@@ -221,10 +224,10 @@ static struct platform_driver pcsp_platform_driver = { | |||
221 | .driver = { | 224 | .driver = { |
222 | .name = "pcspkr", | 225 | .name = "pcspkr", |
223 | .owner = THIS_MODULE, | 226 | .owner = THIS_MODULE, |
227 | .pm = PCSP_PM_OPS, | ||
224 | }, | 228 | }, |
225 | .probe = pcsp_probe, | 229 | .probe = pcsp_probe, |
226 | .remove = __devexit_p(pcsp_remove), | 230 | .remove = __devexit_p(pcsp_remove), |
227 | .suspend = pcsp_suspend, | ||
228 | .shutdown = pcsp_shutdown, | 231 | .shutdown = pcsp_shutdown, |
229 | }; | 232 | }; |
230 | 233 | ||
diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index aef54beaf8b7..f5ceb6f282de 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c | |||
@@ -144,19 +144,24 @@ static int __devexit snd_pmac_remove(struct platform_device *devptr) | |||
144 | } | 144 | } |
145 | 145 | ||
146 | #ifdef CONFIG_PM | 146 | #ifdef CONFIG_PM |
147 | static int snd_pmac_driver_suspend(struct platform_device *devptr, pm_message_t state) | 147 | static int snd_pmac_driver_suspend(struct device *dev) |
148 | { | 148 | { |
149 | struct snd_card *card = platform_get_drvdata(devptr); | 149 | struct snd_card *card = dev_get_drvdata(dev); |
150 | snd_pmac_suspend(card->private_data); | 150 | snd_pmac_suspend(card->private_data); |
151 | return 0; | 151 | return 0; |
152 | } | 152 | } |
153 | 153 | ||
154 | static int snd_pmac_driver_resume(struct platform_device *devptr) | 154 | static int snd_pmac_driver_resume(struct device *dev) |
155 | { | 155 | { |
156 | struct snd_card *card = platform_get_drvdata(devptr); | 156 | struct snd_card *card = dev_get_drvdata(dev); |
157 | snd_pmac_resume(card->private_data); | 157 | snd_pmac_resume(card->private_data); |
158 | return 0; | 158 | return 0; |
159 | } | 159 | } |
160 | |||
161 | static SIMPLE_DEV_PM_OPS(snd_pmac_pm, snd_pmac_driver_suspend, snd_pmac_driver_resume); | ||
162 | #define SND_PMAC_PM_OPS &snd_pmac_pm | ||
163 | #else | ||
164 | #define SND_PMAC_PM_OPS NULL | ||
160 | #endif | 165 | #endif |
161 | 166 | ||
162 | #define SND_PMAC_DRIVER "snd_powermac" | 167 | #define SND_PMAC_DRIVER "snd_powermac" |
@@ -164,13 +169,10 @@ static int snd_pmac_driver_resume(struct platform_device *devptr) | |||
164 | static struct platform_driver snd_pmac_driver = { | 169 | static struct platform_driver snd_pmac_driver = { |
165 | .probe = snd_pmac_probe, | 170 | .probe = snd_pmac_probe, |
166 | .remove = __devexit_p(snd_pmac_remove), | 171 | .remove = __devexit_p(snd_pmac_remove), |
167 | #ifdef CONFIG_PM | ||
168 | .suspend = snd_pmac_driver_suspend, | ||
169 | .resume = snd_pmac_driver_resume, | ||
170 | #endif | ||
171 | .driver = { | 172 | .driver = { |
172 | .name = SND_PMAC_DRIVER, | 173 | .name = SND_PMAC_DRIVER, |
173 | .owner = THIS_MODULE, | 174 | .owner = THIS_MODULE, |
175 | .pm = SND_PMAC_PM_OPS, | ||
174 | }, | 176 | }, |
175 | }; | 177 | }; |
176 | 178 | ||