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/atmel/abdac.c | |
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/atmel/abdac.c')
-rw-r--r-- | sound/atmel/abdac.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c index 2e866398bffe..eb4ceb71123e 100644 --- a/sound/atmel/abdac.c +++ b/sound/atmel/abdac.c | |||
@@ -535,9 +535,9 @@ out_put_pclk: | |||
535 | } | 535 | } |
536 | 536 | ||
537 | #ifdef CONFIG_PM | 537 | #ifdef CONFIG_PM |
538 | static int atmel_abdac_suspend(struct platform_device *pdev, pm_message_t msg) | 538 | static int atmel_abdac_suspend(struct device *pdev) |
539 | { | 539 | { |
540 | struct snd_card *card = platform_get_drvdata(pdev); | 540 | struct snd_card *card = dev_get_drvdata(pdev); |
541 | struct atmel_abdac *dac = card->private_data; | 541 | struct atmel_abdac *dac = card->private_data; |
542 | 542 | ||
543 | dw_dma_cyclic_stop(dac->dma.chan); | 543 | dw_dma_cyclic_stop(dac->dma.chan); |
@@ -547,9 +547,9 @@ static int atmel_abdac_suspend(struct platform_device *pdev, pm_message_t msg) | |||
547 | return 0; | 547 | return 0; |
548 | } | 548 | } |
549 | 549 | ||
550 | static int atmel_abdac_resume(struct platform_device *pdev) | 550 | static int atmel_abdac_resume(struct device *pdev) |
551 | { | 551 | { |
552 | struct snd_card *card = platform_get_drvdata(pdev); | 552 | struct snd_card *card = dev_get_drvdata(pdev); |
553 | struct atmel_abdac *dac = card->private_data; | 553 | struct atmel_abdac *dac = card->private_data; |
554 | 554 | ||
555 | clk_enable(dac->pclk); | 555 | clk_enable(dac->pclk); |
@@ -559,9 +559,11 @@ static int atmel_abdac_resume(struct platform_device *pdev) | |||
559 | 559 | ||
560 | return 0; | 560 | return 0; |
561 | } | 561 | } |
562 | |||
563 | static SIMPLE_DEV_PM_OPS(atmel_abdac_pm, atmel_abdac_suspend, atmel_abdac_resume); | ||
564 | #define ATMEL_ABDAC_PM_OPS &atmel_abdac_pm | ||
562 | #else | 565 | #else |
563 | #define atmel_abdac_suspend NULL | 566 | #define ATMEL_ABDAC_PM_OPS NULL |
564 | #define atmel_abdac_resume NULL | ||
565 | #endif | 567 | #endif |
566 | 568 | ||
567 | static int __devexit atmel_abdac_remove(struct platform_device *pdev) | 569 | static int __devexit atmel_abdac_remove(struct platform_device *pdev) |
@@ -590,9 +592,8 @@ static struct platform_driver atmel_abdac_driver = { | |||
590 | .driver = { | 592 | .driver = { |
591 | .name = "atmel_abdac", | 593 | .name = "atmel_abdac", |
592 | .owner = THIS_MODULE, | 594 | .owner = THIS_MODULE, |
595 | .pm = ATMEL_ABDAC_PM_OPS, | ||
593 | }, | 596 | }, |
594 | .suspend = atmel_abdac_suspend, | ||
595 | .resume = atmel_abdac_resume, | ||
596 | }; | 597 | }; |
597 | 598 | ||
598 | static int __init atmel_abdac_init(void) | 599 | static int __init atmel_abdac_init(void) |