diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-01-23 17:55:23 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-01-27 05:30:54 -0500 |
commit | 6627a653bceb3a54e55e5cdc478ec5b8d5c9cc44 (patch) | |
tree | 9a6f157ad1123e4f047689bbf3c4ef88ec1259a4 /sound/soc/codecs/wm8510.c | |
parent | 0db4d0705260dd4bddf1e5a5441c58bdf08bdc9f (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/wm8510.c')
-rw-r--r-- | sound/soc/codecs/wm8510.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index abe7cce87714..f01078cfbd72 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c | |||
@@ -452,7 +452,7 @@ static int wm8510_pcm_hw_params(struct snd_pcm_substream *substream, | |||
452 | { | 452 | { |
453 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 453 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
454 | struct snd_soc_device *socdev = rtd->socdev; | 454 | struct snd_soc_device *socdev = rtd->socdev; |
455 | struct snd_soc_codec *codec = socdev->codec; | 455 | struct snd_soc_codec *codec = socdev->card->codec; |
456 | u16 iface = wm8510_read_reg_cache(codec, WM8510_IFACE) & 0x19f; | 456 | u16 iface = wm8510_read_reg_cache(codec, WM8510_IFACE) & 0x19f; |
457 | u16 adn = wm8510_read_reg_cache(codec, WM8510_ADD) & 0x1f1; | 457 | u16 adn = wm8510_read_reg_cache(codec, WM8510_ADD) & 0x1f1; |
458 | 458 | ||
@@ -581,7 +581,7 @@ EXPORT_SYMBOL_GPL(wm8510_dai); | |||
581 | static int wm8510_suspend(struct platform_device *pdev, pm_message_t state) | 581 | static int wm8510_suspend(struct platform_device *pdev, pm_message_t state) |
582 | { | 582 | { |
583 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 583 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
584 | struct snd_soc_codec *codec = socdev->codec; | 584 | struct snd_soc_codec *codec = socdev->card->codec; |
585 | 585 | ||
586 | wm8510_set_bias_level(codec, SND_SOC_BIAS_OFF); | 586 | wm8510_set_bias_level(codec, SND_SOC_BIAS_OFF); |
587 | return 0; | 587 | return 0; |
@@ -590,7 +590,7 @@ static int wm8510_suspend(struct platform_device *pdev, pm_message_t state) | |||
590 | static int wm8510_resume(struct platform_device *pdev) | 590 | static int wm8510_resume(struct platform_device *pdev) |
591 | { | 591 | { |
592 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 592 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
593 | struct snd_soc_codec *codec = socdev->codec; | 593 | struct snd_soc_codec *codec = socdev->card->codec; |
594 | int i; | 594 | int i; |
595 | u8 data[2]; | 595 | u8 data[2]; |
596 | u16 *cache = codec->reg_cache; | 596 | u16 *cache = codec->reg_cache; |
@@ -612,7 +612,7 @@ static int wm8510_resume(struct platform_device *pdev) | |||
612 | */ | 612 | */ |
613 | static int wm8510_init(struct snd_soc_device *socdev) | 613 | static int wm8510_init(struct snd_soc_device *socdev) |
614 | { | 614 | { |
615 | struct snd_soc_codec *codec = socdev->codec; | 615 | struct snd_soc_codec *codec = socdev->card->codec; |
616 | int ret = 0; | 616 | int ret = 0; |
617 | 617 | ||
618 | codec->name = "WM8510"; | 618 | codec->name = "WM8510"; |
@@ -670,7 +670,7 @@ static int wm8510_i2c_probe(struct i2c_client *i2c, | |||
670 | const struct i2c_device_id *id) | 670 | const struct i2c_device_id *id) |
671 | { | 671 | { |
672 | struct snd_soc_device *socdev = wm8510_socdev; | 672 | struct snd_soc_device *socdev = wm8510_socdev; |
673 | struct snd_soc_codec *codec = socdev->codec; | 673 | struct snd_soc_codec *codec = socdev->card->codec; |
674 | int ret; | 674 | int ret; |
675 | 675 | ||
676 | i2c_set_clientdata(i2c, codec); | 676 | i2c_set_clientdata(i2c, codec); |
@@ -751,7 +751,7 @@ err_driver: | |||
751 | static int __devinit wm8510_spi_probe(struct spi_device *spi) | 751 | static int __devinit wm8510_spi_probe(struct spi_device *spi) |
752 | { | 752 | { |
753 | struct snd_soc_device *socdev = wm8510_socdev; | 753 | struct snd_soc_device *socdev = wm8510_socdev; |
754 | struct snd_soc_codec *codec = socdev->codec; | 754 | struct snd_soc_codec *codec = socdev->card->codec; |
755 | int ret; | 755 | int ret; |
756 | 756 | ||
757 | codec->control_data = spi; | 757 | codec->control_data = spi; |
@@ -817,7 +817,7 @@ static int wm8510_probe(struct platform_device *pdev) | |||
817 | if (codec == NULL) | 817 | if (codec == NULL) |
818 | return -ENOMEM; | 818 | return -ENOMEM; |
819 | 819 | ||
820 | socdev->codec = codec; | 820 | socdev->card->codec = codec; |
821 | mutex_init(&codec->mutex); | 821 | mutex_init(&codec->mutex); |
822 | INIT_LIST_HEAD(&codec->dapm_widgets); | 822 | INIT_LIST_HEAD(&codec->dapm_widgets); |
823 | INIT_LIST_HEAD(&codec->dapm_paths); | 823 | INIT_LIST_HEAD(&codec->dapm_paths); |
@@ -847,7 +847,7 @@ static int wm8510_probe(struct platform_device *pdev) | |||
847 | static int wm8510_remove(struct platform_device *pdev) | 847 | static int wm8510_remove(struct platform_device *pdev) |
848 | { | 848 | { |
849 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 849 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
850 | struct snd_soc_codec *codec = socdev->codec; | 850 | struct snd_soc_codec *codec = socdev->card->codec; |
851 | 851 | ||
852 | if (codec->control_data) | 852 | if (codec->control_data) |
853 | wm8510_set_bias_level(codec, SND_SOC_BIAS_OFF); | 853 | wm8510_set_bias_level(codec, SND_SOC_BIAS_OFF); |