aboutsummaryrefslogtreecommitdiffstats
path: root/sound/spi
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-03-15 08:25:36 -0400
committerTakashi Iwai <tiwai@suse.de>2013-04-11 05:58:12 -0400
commit01f9326ae4087bd278783811e5e6b6c0058dd455 (patch)
treec50c062bca9b347254debef539226813c924755e /sound/spi
parent21bb5aafce4350e243f9be3d981c0beb2e2c5ab4 (diff)
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')
-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 4dd60d8a4889..a1a24b979ed2 100644
--- a/sound/spi/at73c213.c
+++ b/sound/spi/at73c213.c
@@ -1075,10 +1075,11 @@ out:
1075 return 0; 1075 return 0;
1076} 1076}
1077 1077
1078#ifdef CONFIG_PM 1078#ifdef CONFIG_PM_SLEEP
1079static int snd_at73c213_suspend(struct spi_device *spi, pm_message_t msg) 1079
1080static int snd_at73c213_suspend(struct device *dev)
1080{ 1081{
1081 struct snd_card *card = dev_get_drvdata(&spi->dev); 1082 struct snd_card *card = dev_get_drvdata(dev);
1082 struct snd_at73c213 *chip = card->private_data; 1083 struct snd_at73c213 *chip = card->private_data;
1083 1084
1084 ssc_writel(chip->ssc->regs, CR, SSC_BIT(CR_TXDIS)); 1085 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)
1087 return 0; 1088 return 0;
1088} 1089}
1089 1090
1090static int snd_at73c213_resume(struct spi_device *spi) 1091static int snd_at73c213_resume(struct device *dev)
1091{ 1092{
1092 struct snd_card *card = dev_get_drvdata(&spi->dev); 1093 struct snd_card *card = dev_get_drvdata(dev);
1093 struct snd_at73c213 *chip = card->private_data; 1094 struct snd_at73c213 *chip = card->private_data;
1094 1095
1095 clk_enable(chip->board->dac_clk); 1096 clk_enable(chip->board->dac_clk);
@@ -1097,18 +1098,21 @@ static int snd_at73c213_resume(struct spi_device *spi)
1097 1098
1098 return 0; 1099 return 0;
1099} 1100}
1101
1102static SIMPLE_DEV_PM_OPS(at73c213_pm_ops, snd_at73c213_suspend,
1103 snd_at73c213_resume);
1104#define AT73C213_PM_OPS (&at73c213_pm_ops)
1105
1100#else 1106#else
1101#define snd_at73c213_suspend NULL 1107#define AT73C213_PM_OPS NULL
1102#define snd_at73c213_resume NULL
1103#endif 1108#endif
1104 1109
1105static struct spi_driver at73c213_driver = { 1110static struct spi_driver at73c213_driver = {
1106 .driver = { 1111 .driver = {
1107 .name = "at73c213", 1112 .name = "at73c213",
1113 .pm = AT73C213_PM_OPS,
1108 }, 1114 },
1109 .probe = snd_at73c213_probe, 1115 .probe = snd_at73c213_probe,
1110 .suspend = snd_at73c213_suspend,
1111 .resume = snd_at73c213_resume,
1112 .remove = snd_at73c213_remove, 1116 .remove = snd_at73c213_remove,
1113}; 1117};
1114 1118