aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8728.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-01-23 17:55:23 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-01-27 05:30:54 -0500
commit6627a653bceb3a54e55e5cdc478ec5b8d5c9cc44 (patch)
tree9a6f157ad1123e4f047689bbf3c4ef88ec1259a4 /sound/soc/codecs/wm8728.c
parent0db4d0705260dd4bddf1e5a5441c58bdf08bdc9f (diff)
ASoC: Push the codec runtime storage into the card structure
This is a further stage on the road to refactoring away the ASoC platform device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8728.c')
-rw-r--r--sound/soc/codecs/wm8728.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c
index f90dc52e975d..f8363b308895 100644
--- a/sound/soc/codecs/wm8728.c
+++ b/sound/soc/codecs/wm8728.c
@@ -137,7 +137,7 @@ static int wm8728_hw_params(struct snd_pcm_substream *substream,
137{ 137{
138 struct snd_soc_pcm_runtime *rtd = substream->private_data; 138 struct snd_soc_pcm_runtime *rtd = substream->private_data;
139 struct snd_soc_device *socdev = rtd->socdev; 139 struct snd_soc_device *socdev = rtd->socdev;
140 struct snd_soc_codec *codec = socdev->codec; 140 struct snd_soc_codec *codec = socdev->card->codec;
141 u16 dac = wm8728_read_reg_cache(codec, WM8728_DACCTL); 141 u16 dac = wm8728_read_reg_cache(codec, WM8728_DACCTL);
142 142
143 dac &= ~0x18; 143 dac &= ~0x18;
@@ -264,7 +264,7 @@ EXPORT_SYMBOL_GPL(wm8728_dai);
264static int wm8728_suspend(struct platform_device *pdev, pm_message_t state) 264static int wm8728_suspend(struct platform_device *pdev, pm_message_t state)
265{ 265{
266 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 266 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
267 struct snd_soc_codec *codec = socdev->codec; 267 struct snd_soc_codec *codec = socdev->card->codec;
268 268
269 wm8728_set_bias_level(codec, SND_SOC_BIAS_OFF); 269 wm8728_set_bias_level(codec, SND_SOC_BIAS_OFF);
270 270
@@ -274,7 +274,7 @@ static int wm8728_suspend(struct platform_device *pdev, pm_message_t state)
274static int wm8728_resume(struct platform_device *pdev) 274static int wm8728_resume(struct platform_device *pdev)
275{ 275{
276 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 276 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
277 struct snd_soc_codec *codec = socdev->codec; 277 struct snd_soc_codec *codec = socdev->card->codec;
278 278
279 wm8728_set_bias_level(codec, codec->suspend_bias_level); 279 wm8728_set_bias_level(codec, codec->suspend_bias_level);
280 280
@@ -287,7 +287,7 @@ static int wm8728_resume(struct platform_device *pdev)
287 */ 287 */
288static int wm8728_init(struct snd_soc_device *socdev) 288static int wm8728_init(struct snd_soc_device *socdev)
289{ 289{
290 struct snd_soc_codec *codec = socdev->codec; 290 struct snd_soc_codec *codec = socdev->card->codec;
291 int ret = 0; 291 int ret = 0;
292 292
293 codec->name = "WM8728"; 293 codec->name = "WM8728";
@@ -349,7 +349,7 @@ static int wm8728_i2c_probe(struct i2c_client *i2c,
349 const struct i2c_device_id *id) 349 const struct i2c_device_id *id)
350{ 350{
351 struct snd_soc_device *socdev = wm8728_socdev; 351 struct snd_soc_device *socdev = wm8728_socdev;
352 struct snd_soc_codec *codec = socdev->codec; 352 struct snd_soc_codec *codec = socdev->card->codec;
353 int ret; 353 int ret;
354 354
355 i2c_set_clientdata(i2c, codec); 355 i2c_set_clientdata(i2c, codec);
@@ -430,7 +430,7 @@ err_driver:
430static int __devinit wm8728_spi_probe(struct spi_device *spi) 430static int __devinit wm8728_spi_probe(struct spi_device *spi)
431{ 431{
432 struct snd_soc_device *socdev = wm8728_socdev; 432 struct snd_soc_device *socdev = wm8728_socdev;
433 struct snd_soc_codec *codec = socdev->codec; 433 struct snd_soc_codec *codec = socdev->card->codec;
434 int ret; 434 int ret;
435 435
436 codec->control_data = spi; 436 codec->control_data = spi;
@@ -494,7 +494,7 @@ static int wm8728_probe(struct platform_device *pdev)
494 if (codec == NULL) 494 if (codec == NULL)
495 return -ENOMEM; 495 return -ENOMEM;
496 496
497 socdev->codec = codec; 497 socdev->card->codec = codec;
498 mutex_init(&codec->mutex); 498 mutex_init(&codec->mutex);
499 INIT_LIST_HEAD(&codec->dapm_widgets); 499 INIT_LIST_HEAD(&codec->dapm_widgets);
500 INIT_LIST_HEAD(&codec->dapm_paths); 500 INIT_LIST_HEAD(&codec->dapm_paths);
@@ -527,7 +527,7 @@ static int wm8728_probe(struct platform_device *pdev)
527static int wm8728_remove(struct platform_device *pdev) 527static int wm8728_remove(struct platform_device *pdev)
528{ 528{
529 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 529 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
530 struct snd_soc_codec *codec = socdev->codec; 530 struct snd_soc_codec *codec = socdev->card->codec;
531 531
532 if (codec->control_data) 532 if (codec->control_data)
533 wm8728_set_bias_level(codec, SND_SOC_BIAS_OFF); 533 wm8728_set_bias_level(codec, SND_SOC_BIAS_OFF);