diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-07-19 08:21:40 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-07-19 08:21:57 +0200 |
commit | 1558eb838ff502faafacf26b6a711dbaae796009 (patch) | |
tree | 8049ea20a214033369725ed58b8b4a3ca4110887 /sound/ppc/powermac.c | |
parent | 4609ed6b1f0ab9f11a9d0361573b53d9d057c440 (diff) | |
parent | 81fcb170852d58d7ebd8101a8ef970c82056426e (diff) |
Merge branch 'topic/pm-convert' into for-next
This merges the changes for converting to new PM ops for platform
and some other drivers.
Also move some header files to local places from the public
include/sound.
Diffstat (limited to 'sound/ppc/powermac.c')
-rw-r--r-- | sound/ppc/powermac.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index 5a4e263b5b0..f5ceb6f282d 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c @@ -144,19 +144,24 @@ static int __devexit snd_pmac_remove(struct platform_device *devptr) } #ifdef CONFIG_PM -static int snd_pmac_driver_suspend(struct platform_device *devptr, pm_message_t state) +static int snd_pmac_driver_suspend(struct device *dev) { - struct snd_card *card = platform_get_drvdata(devptr); + struct snd_card *card = dev_get_drvdata(dev); snd_pmac_suspend(card->private_data); return 0; } -static int snd_pmac_driver_resume(struct platform_device *devptr) +static int snd_pmac_driver_resume(struct device *dev) { - struct snd_card *card = platform_get_drvdata(devptr); + struct snd_card *card = dev_get_drvdata(dev); snd_pmac_resume(card->private_data); return 0; } + +static SIMPLE_DEV_PM_OPS(snd_pmac_pm, snd_pmac_driver_suspend, snd_pmac_driver_resume); +#define SND_PMAC_PM_OPS &snd_pmac_pm +#else +#define SND_PMAC_PM_OPS NULL #endif #define SND_PMAC_DRIVER "snd_powermac" @@ -164,12 +169,10 @@ static int snd_pmac_driver_resume(struct platform_device *devptr) static struct platform_driver snd_pmac_driver = { .probe = snd_pmac_probe, .remove = __devexit_p(snd_pmac_remove), -#ifdef CONFIG_PM - .suspend = snd_pmac_driver_suspend, - .resume = snd_pmac_driver_resume, -#endif .driver = { - .name = SND_PMAC_DRIVER + .name = SND_PMAC_DRIVER, + .owner = THIS_MODULE, + .pm = SND_PMAC_PM_OPS, }, }; |