diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-07-02 05:22:40 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-07-03 01:58:19 -0400 |
commit | 284e7ca75f96a18f182cce38ba76ee724fb97e16 (patch) | |
tree | c5dedd35372f9978e5f68d2c31a57ce6afdc0c87 /sound/drivers/pcsp | |
parent | 8bf01d8abc55eaf8e19a2d48911c8e49ee6f5bab (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/pcsp')
-rw-r--r-- | sound/drivers/pcsp/pcsp.c | 11 |
1 files changed, 7 insertions, 4 deletions
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 | ||