aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/dummy.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/dummy.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/dummy.c')
-rw-r--r--sound/drivers/dummy.c18
1 files changed, 10 insertions, 8 deletions
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
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,13 +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,
1098 .owner = THIS_MODULE, 1099 .owner = THIS_MODULE,
1100 .pm = SND_DUMMY_PM_OPS,
1099 }, 1101 },
1100}; 1102};
1101 1103