aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers')
-rw-r--r--sound/drivers/aloop.c22
-rw-r--r--sound/drivers/dummy.c21
-rw-r--r--sound/drivers/mpu401/mpu401.c3
-rw-r--r--sound/drivers/mtpav.c3
-rw-r--r--sound/drivers/mts64.c3
-rw-r--r--sound/drivers/pcsp/pcsp.c11
-rw-r--r--sound/drivers/portman2x4.c3
-rw-r--r--sound/drivers/serial-u16550.c3
-rw-r--r--sound/drivers/virmidi.c3
-rw-r--r--sound/drivers/vx/vx_core.c2
10 files changed, 44 insertions, 30 deletions
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
index 8b5c36f4d303..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
1180static int loopback_suspend(struct platform_device *pdev, 1180static 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
1193static int loopback_resume(struct platform_device *pdev) 1192static 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
1200static 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,12 +1208,10 @@ static int loopback_resume(struct platform_device *pdev)
1204static struct platform_driver loopback_driver = { 1208static 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,
1214 .pm = LOOPBACK_PM_OPS,
1213 }, 1215 },
1214}; 1216};
1215 1217
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index ad9434fd6370..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
1068static int snd_dummy_suspend(struct platform_device *pdev, pm_message_t state) 1068static 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
1078static int snd_dummy_resume(struct platform_device *pdev) 1078static 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
1086static 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,12 +1094,10 @@ static int snd_dummy_resume(struct platform_device *pdev)
1089static struct platform_driver snd_dummy_driver = { 1094static 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,
1099 .owner = THIS_MODULE,
1100 .pm = SND_DUMMY_PM_OPS,
1098 }, 1101 },
1099}; 1102};
1100 1103
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c
index 86f5fbc2da72..bc03a2046c9c 100644
--- a/sound/drivers/mpu401/mpu401.c
+++ b/sound/drivers/mpu401/mpu401.c
@@ -139,7 +139,8 @@ static struct platform_driver snd_mpu401_driver = {
139 .probe = snd_mpu401_probe, 139 .probe = snd_mpu401_probe,
140 .remove = __devexit_p(snd_mpu401_remove), 140 .remove = __devexit_p(snd_mpu401_remove),
141 .driver = { 141 .driver = {
142 .name = SND_MPU401_DRIVER 142 .name = SND_MPU401_DRIVER,
143 .owner = THIS_MODULE,
143 }, 144 },
144}; 145};
145 146
diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c
index 76930793fb69..cad73af3860c 100644
--- a/sound/drivers/mtpav.c
+++ b/sound/drivers/mtpav.c
@@ -759,7 +759,8 @@ static struct platform_driver snd_mtpav_driver = {
759 .probe = snd_mtpav_probe, 759 .probe = snd_mtpav_probe,
760 .remove = __devexit_p(snd_mtpav_remove), 760 .remove = __devexit_p(snd_mtpav_remove),
761 .driver = { 761 .driver = {
762 .name = SND_MTPAV_DRIVER 762 .name = SND_MTPAV_DRIVER,
763 .owner = THIS_MODULE,
763 }, 764 },
764}; 765};
765 766
diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c
index 621e60e2029f..2d5514b0a290 100644
--- a/sound/drivers/mts64.c
+++ b/sound/drivers/mts64.c
@@ -1040,7 +1040,8 @@ static struct platform_driver snd_mts64_driver = {
1040 .probe = snd_mts64_probe, 1040 .probe = snd_mts64_probe,
1041 .remove = __devexit_p(snd_mts64_remove), 1041 .remove = __devexit_p(snd_mts64_remove),
1042 .driver = { 1042 .driver = {
1043 .name = PLATFORM_DRIVER 1043 .name = PLATFORM_DRIVER,
1044 .owner = THIS_MODULE,
1044 } 1045 }
1045}; 1046};
1046 1047
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
203static int pcsp_suspend(struct platform_device *dev, pm_message_t state) 203static 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
211static 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
214static void pcsp_shutdown(struct platform_device *dev) 217static 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/drivers/portman2x4.c b/sound/drivers/portman2x4.c
index 3e32bd3d95d9..8364855ed14f 100644
--- a/sound/drivers/portman2x4.c
+++ b/sound/drivers/portman2x4.c
@@ -829,7 +829,8 @@ static struct platform_driver snd_portman_driver = {
829 .probe = snd_portman_probe, 829 .probe = snd_portman_probe,
830 .remove = __devexit_p(snd_portman_remove), 830 .remove = __devexit_p(snd_portman_remove),
831 .driver = { 831 .driver = {
832 .name = PLATFORM_DRIVER 832 .name = PLATFORM_DRIVER,
833 .owner = THIS_MODULE,
833 } 834 }
834}; 835};
835 836
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index b2d0e8e49bed..86700671d1ac 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -995,7 +995,8 @@ static struct platform_driver snd_serial_driver = {
995 .probe = snd_serial_probe, 995 .probe = snd_serial_probe,
996 .remove = __devexit_p( snd_serial_remove), 996 .remove = __devexit_p( snd_serial_remove),
997 .driver = { 997 .driver = {
998 .name = SND_SERIAL_DRIVER 998 .name = SND_SERIAL_DRIVER,
999 .owner = THIS_MODULE,
999 }, 1000 },
1000}; 1001};
1001 1002
diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c
index 9d97478a18b3..d7d514df9058 100644
--- a/sound/drivers/virmidi.c
+++ b/sound/drivers/virmidi.c
@@ -142,7 +142,8 @@ static struct platform_driver snd_virmidi_driver = {
142 .probe = snd_virmidi_probe, 142 .probe = snd_virmidi_probe,
143 .remove = __devexit_p(snd_virmidi_remove), 143 .remove = __devexit_p(snd_virmidi_remove),
144 .driver = { 144 .driver = {
145 .name = SND_VIRMIDI_DRIVER 145 .name = SND_VIRMIDI_DRIVER,
146 .owner = THIS_MODULE,
146 }, 147 },
147}; 148};
148 149
diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c
index b8e515999bc2..de5055a3b0d0 100644
--- a/sound/drivers/vx/vx_core.c
+++ b/sound/drivers/vx/vx_core.c
@@ -725,7 +725,7 @@ EXPORT_SYMBOL(snd_vx_dsp_load);
725/* 725/*
726 * suspend 726 * suspend
727 */ 727 */
728int snd_vx_suspend(struct vx_core *chip, pm_message_t state) 728int snd_vx_suspend(struct vx_core *chip)
729{ 729{
730 unsigned int i; 730 unsigned int i;
731 731