diff options
Diffstat (limited to 'sound/soc/blackfin/bf5xx-tdm.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-tdm.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sound/soc/blackfin/bf5xx-tdm.c b/sound/soc/blackfin/bf5xx-tdm.c index 24c14269f4bc..125123929f16 100644 --- a/sound/soc/blackfin/bf5xx-tdm.c +++ b/sound/soc/blackfin/bf5xx-tdm.c | |||
@@ -214,9 +214,9 @@ static int bf5xx_tdm_suspend(struct snd_soc_dai *dai) | |||
214 | 214 | ||
215 | if (!dai->active) | 215 | if (!dai->active) |
216 | return 0; | 216 | return 0; |
217 | if (dai->capture.active) | 217 | if (dai->capture_active) |
218 | sport_rx_stop(sport); | 218 | sport_rx_stop(sport); |
219 | if (dai->playback.active) | 219 | if (dai->playback_active) |
220 | sport_tx_stop(sport); | 220 | sport_tx_stop(sport); |
221 | return 0; | 221 | return 0; |
222 | } | 222 | } |
@@ -224,7 +224,7 @@ static int bf5xx_tdm_suspend(struct snd_soc_dai *dai) | |||
224 | static int bf5xx_tdm_resume(struct snd_soc_dai *dai) | 224 | static int bf5xx_tdm_resume(struct snd_soc_dai *dai) |
225 | { | 225 | { |
226 | int ret; | 226 | int ret; |
227 | struct sport_device *sport = dai->private_data; | 227 | struct sport_device *sport = snd_soc_dai_get_drvdata(dai); |
228 | 228 | ||
229 | if (!dai->active) | 229 | if (!dai->active) |
230 | return 0; | 230 | return 0; |
@@ -262,9 +262,7 @@ static struct snd_soc_dai_ops bf5xx_tdm_dai_ops = { | |||
262 | .set_channel_map = bf5xx_tdm_set_channel_map, | 262 | .set_channel_map = bf5xx_tdm_set_channel_map, |
263 | }; | 263 | }; |
264 | 264 | ||
265 | struct snd_soc_dai bf5xx_tdm_dai = { | 265 | static struct snd_soc_dai_driver bf5xx_tdm_dai = { |
266 | .name = "bf5xx-tdm", | ||
267 | .id = 0, | ||
268 | .suspend = bf5xx_tdm_suspend, | 266 | .suspend = bf5xx_tdm_suspend, |
269 | .resume = bf5xx_tdm_resume, | 267 | .resume = bf5xx_tdm_resume, |
270 | .playback = { | 268 | .playback = { |
@@ -279,7 +277,6 @@ struct snd_soc_dai bf5xx_tdm_dai = { | |||
279 | .formats = SNDRV_PCM_FMTBIT_S32_LE,}, | 277 | .formats = SNDRV_PCM_FMTBIT_S32_LE,}, |
280 | .ops = &bf5xx_tdm_dai_ops, | 278 | .ops = &bf5xx_tdm_dai_ops, |
281 | }; | 279 | }; |
282 | EXPORT_SYMBOL_GPL(bf5xx_tdm_dai); | ||
283 | 280 | ||
284 | static int __devinit bfin_tdm_probe(struct platform_device *pdev) | 281 | static int __devinit bfin_tdm_probe(struct platform_device *pdev) |
285 | { | 282 | { |
@@ -320,7 +317,7 @@ static int __devinit bfin_tdm_probe(struct platform_device *pdev) | |||
320 | goto sport_config_err; | 317 | goto sport_config_err; |
321 | } | 318 | } |
322 | 319 | ||
323 | ret = snd_soc_register_dai(&bf5xx_tdm_dai); | 320 | ret = snd_soc_register_dai(&pdev->dev, &bf5xx_tdm_dai); |
324 | if (ret) { | 321 | if (ret) { |
325 | pr_err("Failed to register DAI: %d\n", ret); | 322 | pr_err("Failed to register DAI: %d\n", ret); |
326 | goto sport_config_err; | 323 | goto sport_config_err; |
@@ -337,7 +334,7 @@ sport_config_err: | |||
337 | static int __devexit bfin_tdm_remove(struct platform_device *pdev) | 334 | static int __devexit bfin_tdm_remove(struct platform_device *pdev) |
338 | { | 335 | { |
339 | peripheral_free_list(&sport_req[sport_num][0]); | 336 | peripheral_free_list(&sport_req[sport_num][0]); |
340 | snd_soc_unregister_dai(&bf5xx_tdm_dai); | 337 | snd_soc_unregister_dai(&pdev->dev); |
341 | 338 | ||
342 | return 0; | 339 | return 0; |
343 | } | 340 | } |