aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/aloop.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-07-02 05:22:40 -0400
committerTakashi Iwai <tiwai@suse.de>2012-07-03 01:58:19 -0400
commit284e7ca75f96a18f182cce38ba76ee724fb97e16 (patch)
treec5dedd35372f9978e5f68d2c31a57ce6afdc0c87 /sound/drivers/aloop.c
parent8bf01d8abc55eaf8e19a2d48911c8e49ee6f5bab (diff)
ALSA: convert PM ops of platform_driver to new pm ops
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/aloop.c')
-rw-r--r--sound/drivers/aloop.c19
1 files changed, 10 insertions, 9 deletions
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
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,13 +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, 1213 .owner = THIS_MODULE,
1214 .pm = LOOPBACK_PM_OPS,
1214 }, 1215 },
1215}; 1216};
1216 1217