summaryrefslogtreecommitdiffstats
path: root/sound/atmel
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/atmel
parent8bf01d8abc55eaf8e19a2d48911c8e49ee6f5bab (diff)
downloadop-kernel-dev-284e7ca75f96a18f182cce38ba76ee724fb97e16.zip
op-kernel-dev-284e7ca75f96a18f182cce38ba76ee724fb97e16.tar.gz
ALSA: convert PM ops of platform_driver to new pm ops
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/atmel')
-rw-r--r--sound/atmel/abdac.c17
-rw-r--r--sound/atmel/ac97c.c17
2 files changed, 18 insertions, 16 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c
index 2e86639..eb4ceb7 100644
--- a/sound/atmel/abdac.c
+++ b/sound/atmel/abdac.c
@@ -535,9 +535,9 @@ out_put_pclk:
}
#ifdef CONFIG_PM
-static int atmel_abdac_suspend(struct platform_device *pdev, pm_message_t msg)
+static int atmel_abdac_suspend(struct device *pdev)
{
- struct snd_card *card = platform_get_drvdata(pdev);
+ struct snd_card *card = dev_get_drvdata(pdev);
struct atmel_abdac *dac = card->private_data;
dw_dma_cyclic_stop(dac->dma.chan);
@@ -547,9 +547,9 @@ static int atmel_abdac_suspend(struct platform_device *pdev, pm_message_t msg)
return 0;
}
-static int atmel_abdac_resume(struct platform_device *pdev)
+static int atmel_abdac_resume(struct device *pdev)
{
- struct snd_card *card = platform_get_drvdata(pdev);
+ struct snd_card *card = dev_get_drvdata(pdev);
struct atmel_abdac *dac = card->private_data;
clk_enable(dac->pclk);
@@ -559,9 +559,11 @@ static int atmel_abdac_resume(struct platform_device *pdev)
return 0;
}
+
+static SIMPLE_DEV_PM_OPS(atmel_abdac_pm, atmel_abdac_suspend, atmel_abdac_resume);
+#define ATMEL_ABDAC_PM_OPS &atmel_abdac_pm
#else
-#define atmel_abdac_suspend NULL
-#define atmel_abdac_resume NULL
+#define ATMEL_ABDAC_PM_OPS NULL
#endif
static int __devexit atmel_abdac_remove(struct platform_device *pdev)
@@ -590,9 +592,8 @@ static struct platform_driver atmel_abdac_driver = {
.driver = {
.name = "atmel_abdac",
.owner = THIS_MODULE,
+ .pm = ATMEL_ABDAC_PM_OPS,
},
- .suspend = atmel_abdac_suspend,
- .resume = atmel_abdac_resume,
};
static int __init atmel_abdac_init(void)
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index 3d0ea82..bf47025 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -1135,9 +1135,9 @@ err_snd_card_new:
}
#ifdef CONFIG_PM
-static int atmel_ac97c_suspend(struct platform_device *pdev, pm_message_t msg)
+static int atmel_ac97c_suspend(struct device *pdev)
{
- struct snd_card *card = platform_get_drvdata(pdev);
+ struct snd_card *card = dev_get_drvdata(pdev);
struct atmel_ac97c *chip = card->private_data;
if (cpu_is_at32ap7000()) {
@@ -1151,9 +1151,9 @@ static int atmel_ac97c_suspend(struct platform_device *pdev, pm_message_t msg)
return 0;
}
-static int atmel_ac97c_resume(struct platform_device *pdev)
+static int atmel_ac97c_resume(struct device *pdev)
{
- struct snd_card *card = platform_get_drvdata(pdev);
+ struct snd_card *card = dev_get_drvdata(pdev);
struct atmel_ac97c *chip = card->private_data;
clk_enable(chip->pclk);
@@ -1165,9 +1165,11 @@ static int atmel_ac97c_resume(struct platform_device *pdev)
}
return 0;
}
+
+static SIMPLE_DEV_PM_OPS(atmel_ac97c_pm, atmel_ac97c_suspend, atmel_ac97c_resume);
+#define ATMEL_AC97C_PM_OPS &atmel_ac97c_pm
#else
-#define atmel_ac97c_suspend NULL
-#define atmel_ac97c_resume NULL
+#define ATMEL_AC97C_PM_OPS NULL
#endif
static int __devexit atmel_ac97c_remove(struct platform_device *pdev)
@@ -1211,9 +1213,8 @@ static struct platform_driver atmel_ac97c_driver = {
.driver = {
.name = "atmel_ac97c",
.owner = THIS_MODULE,
+ .pm = ATMEL_AC97C_PM_OPS,
},
- .suspend = atmel_ac97c_suspend,
- .resume = atmel_ac97c_resume,
};
static int __init atmel_ac97c_init(void)
OpenPOWER on IntegriCloud