diff options
Diffstat (limited to 'sound/soc/intel/byt-rt5640.c')
-rw-r--r-- | sound/soc/intel/byt-rt5640.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c index 5535c3fb7922..53d160d39972 100644 --- a/sound/soc/intel/byt-rt5640.c +++ b/sound/soc/intel/byt-rt5640.c | |||
@@ -132,43 +132,20 @@ static struct snd_soc_card byt_rt5640_card = { | |||
132 | .num_dapm_routes = ARRAY_SIZE(byt_rt5640_audio_map), | 132 | .num_dapm_routes = ARRAY_SIZE(byt_rt5640_audio_map), |
133 | }; | 133 | }; |
134 | 134 | ||
135 | #ifdef CONFIG_PM_SLEEP | ||
136 | static const struct dev_pm_ops byt_rt5640_pm_ops = { | ||
137 | .suspend = snd_soc_suspend, | ||
138 | .resume = snd_soc_resume, | ||
139 | }; | ||
140 | |||
141 | #define BYT_RT5640_PM_OPS (&byt_rt5640_pm_ops) | ||
142 | #else | ||
143 | #define BYT_RT5640_PM_OPS NULL | ||
144 | #endif | ||
145 | |||
146 | static int byt_rt5640_probe(struct platform_device *pdev) | 135 | static int byt_rt5640_probe(struct platform_device *pdev) |
147 | { | 136 | { |
148 | struct snd_soc_card *card = &byt_rt5640_card; | 137 | struct snd_soc_card *card = &byt_rt5640_card; |
149 | struct device *dev = &pdev->dev; | ||
150 | 138 | ||
151 | card->dev = &pdev->dev; | 139 | card->dev = &pdev->dev; |
152 | dev_set_drvdata(dev, card); | 140 | return devm_snd_soc_register_card(&pdev->dev, card); |
153 | return snd_soc_register_card(card); | ||
154 | } | ||
155 | |||
156 | static int byt_rt5640_remove(struct platform_device *pdev) | ||
157 | { | ||
158 | struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
159 | |||
160 | snd_soc_unregister_card(card); | ||
161 | |||
162 | return 0; | ||
163 | } | 141 | } |
164 | 142 | ||
165 | static struct platform_driver byt_rt5640_audio = { | 143 | static struct platform_driver byt_rt5640_audio = { |
166 | .probe = byt_rt5640_probe, | 144 | .probe = byt_rt5640_probe, |
167 | .remove = byt_rt5640_remove, | ||
168 | .driver = { | 145 | .driver = { |
169 | .name = "byt-rt5640", | 146 | .name = "byt-rt5640", |
170 | .owner = THIS_MODULE, | 147 | .owner = THIS_MODULE, |
171 | .pm = BYT_RT5640_PM_OPS, | 148 | .pm = &snd_soc_pm_ops, |
172 | }, | 149 | }, |
173 | }; | 150 | }; |
174 | module_platform_driver(byt_rt5640_audio) | 151 | module_platform_driver(byt_rt5640_audio) |