summaryrefslogtreecommitdiffstats
path: root/sound/drivers/pcsp
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-07-02 11:22:40 +0200
committerTakashi Iwai <tiwai@suse.de>2012-07-03 07:58:19 +0200
commit284e7ca75f96a18f182cce38ba76ee724fb97e16 (patch)
treec5dedd35372f9978e5f68d2c31a57ce6afdc0c87 /sound/drivers/pcsp
parent8bf01d8abc55eaf8e19a2d48911c8e49ee6f5bab (diff)
downloadlinux-284e7ca75f96a18f182cce38ba76ee724fb97e16.tar.bz2
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.c11
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)
}
#ifdef CONFIG_PM
-static int pcsp_suspend(struct platform_device *dev, pm_message_t state)
+static int pcsp_suspend(struct device *dev)
{
- struct snd_pcsp *chip = platform_get_drvdata(dev);
+ struct snd_pcsp *chip = dev_get_drvdata(dev);
pcsp_stop_beep(chip);
snd_pcm_suspend_all(chip->pcm);
return 0;
}
+
+static SIMPLE_DEV_PM_OPS(pcsp_pm, pcsp_suspend, NULL);
+#define PCSP_PM_OPS &pcsp_pm
#else
-#define pcsp_suspend NULL
+#define PCSP_PM_OPS NULL
#endif /* CONFIG_PM */
static void pcsp_shutdown(struct platform_device *dev)
@@ -221,10 +224,10 @@ static struct platform_driver pcsp_platform_driver = {
.driver = {
.name = "pcspkr",
.owner = THIS_MODULE,
+ .pm = PCSP_PM_OPS,
},
.probe = pcsp_probe,
.remove = __devexit_p(pcsp_remove),
- .suspend = pcsp_suspend,
.shutdown = pcsp_shutdown,
};