summaryrefslogtreecommitdiffstats
path: root/sound/spi/at73c213.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-03-15 13:25:36 +0100
committerTakashi Iwai <tiwai@suse.de>2013-04-11 11:58:12 +0200
commit01f9326ae4087bd278783811e5e6b6c0058dd455 (patch)
treec50c062bca9b347254debef539226813c924755e /sound/spi/at73c213.c
parent21bb5aafce4350e243f9be3d981c0beb2e2c5ab4 (diff)
downloadop-kernel-dev-01f9326ae4087bd278783811e5e6b6c0058dd455.zip
op-kernel-dev-01f9326ae4087bd278783811e5e6b6c0058dd455.tar.gz
ALSA: at73c213: Use dev_pm_ops
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/spi/at73c213.c')
-rw-r--r--sound/spi/at73c213.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c
index 4dd60d8..a1a24b9 100644
--- a/sound/spi/at73c213.c
+++ b/sound/spi/at73c213.c
@@ -1075,10 +1075,11 @@ out:
return 0;
}
-#ifdef CONFIG_PM
-static int snd_at73c213_suspend(struct spi_device *spi, pm_message_t msg)
+#ifdef CONFIG_PM_SLEEP
+
+static int snd_at73c213_suspend(struct device *dev)
{
- struct snd_card *card = dev_get_drvdata(&spi->dev);
+ struct snd_card *card = dev_get_drvdata(dev);
struct snd_at73c213 *chip = card->private_data;
ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXDIS));
@@ -1087,9 +1088,9 @@ static int snd_at73c213_suspend(struct spi_device *spi, pm_message_t msg)
return 0;
}
-static int snd_at73c213_resume(struct spi_device *spi)
+static int snd_at73c213_resume(struct device *dev)
{
- struct snd_card *card = dev_get_drvdata(&spi->dev);
+ struct snd_card *card = dev_get_drvdata(dev);
struct snd_at73c213 *chip = card->private_data;
clk_enable(chip->board->dac_clk);
@@ -1097,18 +1098,21 @@ static int snd_at73c213_resume(struct spi_device *spi)
return 0;
}
+
+static SIMPLE_DEV_PM_OPS(at73c213_pm_ops, snd_at73c213_suspend,
+ snd_at73c213_resume);
+#define AT73C213_PM_OPS (&at73c213_pm_ops)
+
#else
-#define snd_at73c213_suspend NULL
-#define snd_at73c213_resume NULL
+#define AT73C213_PM_OPS NULL
#endif
static struct spi_driver at73c213_driver = {
.driver = {
.name = "at73c213",
+ .pm = AT73C213_PM_OPS,
},
.probe = snd_at73c213_probe,
- .suspend = snd_at73c213_suspend,
- .resume = snd_at73c213_resume,
.remove = snd_at73c213_remove,
};
OpenPOWER on IntegriCloud