aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ak4535.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/ak4535.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/ak4535.c')
-rw-r--r--sound/soc/codecs/ak4535.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index f17c363cb1db..d56e6bb1fedb 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -329,7 +329,7 @@ static int ak4535_hw_params(struct snd_pcm_substream *substream,
329{ 329{
330 struct snd_soc_pcm_runtime *rtd = substream->private_data; 330 struct snd_soc_pcm_runtime *rtd = substream->private_data;
331 struct snd_soc_device *socdev = rtd->socdev; 331 struct snd_soc_device *socdev = rtd->socdev;
332 struct snd_soc_codec *codec = socdev->codec; 332 struct snd_soc_codec *codec = socdev->card->codec;
333 struct ak4535_priv *ak4535 = codec->private_data; 333 struct ak4535_priv *ak4535 = codec->private_data;
334 u8 mode2 = ak4535_read_reg_cache(codec, AK4535_MODE2) & ~(0x3 << 5); 334 u8 mode2 = ak4535_read_reg_cache(codec, AK4535_MODE2) & ~(0x3 << 5);
335 int rate = params_rate(params), fs = 256; 335 int rate = params_rate(params), fs = 256;
@@ -447,7 +447,7 @@ EXPORT_SYMBOL_GPL(ak4535_dai);
447static int ak4535_suspend(struct platform_device *pdev, pm_message_t state) 447static int ak4535_suspend(struct platform_device *pdev, pm_message_t state)
448{ 448{
449 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 449 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
450 struct snd_soc_codec *codec = socdev->codec; 450 struct snd_soc_codec *codec = socdev->card->codec;
451 451
452 ak4535_set_bias_level(codec, SND_SOC_BIAS_OFF); 452 ak4535_set_bias_level(codec, SND_SOC_BIAS_OFF);
453 return 0; 453 return 0;
@@ -456,7 +456,7 @@ static int ak4535_suspend(struct platform_device *pdev, pm_message_t state)
456static int ak4535_resume(struct platform_device *pdev) 456static int ak4535_resume(struct platform_device *pdev)
457{ 457{
458 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 458 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
459 struct snd_soc_codec *codec = socdev->codec; 459 struct snd_soc_codec *codec = socdev->card->codec;
460 ak4535_sync(codec); 460 ak4535_sync(codec);
461 ak4535_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 461 ak4535_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
462 ak4535_set_bias_level(codec, codec->suspend_bias_level); 462 ak4535_set_bias_level(codec, codec->suspend_bias_level);
@@ -469,7 +469,7 @@ static int ak4535_resume(struct platform_device *pdev)
469 */ 469 */
470static int ak4535_init(struct snd_soc_device *socdev) 470static int ak4535_init(struct snd_soc_device *socdev)
471{ 471{
472 struct snd_soc_codec *codec = socdev->codec; 472 struct snd_soc_codec *codec = socdev->card->codec;
473 int ret = 0; 473 int ret = 0;
474 474
475 codec->name = "AK4535"; 475 codec->name = "AK4535";
@@ -523,7 +523,7 @@ static int ak4535_i2c_probe(struct i2c_client *i2c,
523 const struct i2c_device_id *id) 523 const struct i2c_device_id *id)
524{ 524{
525 struct snd_soc_device *socdev = ak4535_socdev; 525 struct snd_soc_device *socdev = ak4535_socdev;
526 struct snd_soc_codec *codec = socdev->codec; 526 struct snd_soc_codec *codec = socdev->card->codec;
527 int ret; 527 int ret;
528 528
529 i2c_set_clientdata(i2c, codec); 529 i2c_set_clientdata(i2c, codec);
@@ -622,7 +622,7 @@ static int ak4535_probe(struct platform_device *pdev)
622 } 622 }
623 623
624 codec->private_data = ak4535; 624 codec->private_data = ak4535;
625 socdev->codec = codec; 625 socdev->card->codec = codec;
626 mutex_init(&codec->mutex); 626 mutex_init(&codec->mutex);
627 INIT_LIST_HEAD(&codec->dapm_widgets); 627 INIT_LIST_HEAD(&codec->dapm_widgets);
628 INIT_LIST_HEAD(&codec->dapm_paths); 628 INIT_LIST_HEAD(&codec->dapm_paths);
@@ -649,7 +649,7 @@ static int ak4535_probe(struct platform_device *pdev)
649static int ak4535_remove(struct platform_device *pdev) 649static int ak4535_remove(struct platform_device *pdev)
650{ 650{
651 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 651 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
652 struct snd_soc_codec *codec = socdev->codec; 652 struct snd_soc_codec *codec = socdev->card->codec;
653 653
654 if (codec->control_data) 654 if (codec->control_data)
655 ak4535_set_bias_level(codec, SND_SOC_BIAS_OFF); 655 ak4535_set_bias_level(codec, SND_SOC_BIAS_OFF);