aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8580.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/wm8580.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/wm8580.c')
-rw-r--r--sound/soc/codecs/wm8580.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index 3faf0e70ce10..d3c51ba5e6f9 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -539,7 +539,7 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
539{ 539{
540 struct snd_soc_pcm_runtime *rtd = substream->private_data; 540 struct snd_soc_pcm_runtime *rtd = substream->private_data;
541 struct snd_soc_device *socdev = rtd->socdev; 541 struct snd_soc_device *socdev = rtd->socdev;
542 struct snd_soc_codec *codec = socdev->codec; 542 struct snd_soc_codec *codec = socdev->card->codec;
543 u16 paifb = wm8580_read(codec, WM8580_PAIF3 + dai->id); 543 u16 paifb = wm8580_read(codec, WM8580_PAIF3 + dai->id);
544 544
545 paifb &= ~WM8580_AIF_LENGTH_MASK; 545 paifb &= ~WM8580_AIF_LENGTH_MASK;
@@ -816,7 +816,7 @@ EXPORT_SYMBOL_GPL(wm8580_dai);
816 */ 816 */
817static int wm8580_init(struct snd_soc_device *socdev) 817static int wm8580_init(struct snd_soc_device *socdev)
818{ 818{
819 struct snd_soc_codec *codec = socdev->codec; 819 struct snd_soc_codec *codec = socdev->card->codec;
820 int ret = 0; 820 int ret = 0;
821 821
822 codec->name = "WM8580"; 822 codec->name = "WM8580";
@@ -888,7 +888,7 @@ static int wm8580_i2c_probe(struct i2c_client *i2c,
888 const struct i2c_device_id *id) 888 const struct i2c_device_id *id)
889{ 889{
890 struct snd_soc_device *socdev = wm8580_socdev; 890 struct snd_soc_device *socdev = wm8580_socdev;
891 struct snd_soc_codec *codec = socdev->codec; 891 struct snd_soc_codec *codec = socdev->card->codec;
892 int ret; 892 int ret;
893 893
894 i2c_set_clientdata(i2c, codec); 894 i2c_set_clientdata(i2c, codec);
@@ -986,7 +986,7 @@ static int wm8580_probe(struct platform_device *pdev)
986 } 986 }
987 987
988 codec->private_data = wm8580; 988 codec->private_data = wm8580;
989 socdev->codec = codec; 989 socdev->card->codec = codec;
990 mutex_init(&codec->mutex); 990 mutex_init(&codec->mutex);
991 INIT_LIST_HEAD(&codec->dapm_widgets); 991 INIT_LIST_HEAD(&codec->dapm_widgets);
992 INIT_LIST_HEAD(&codec->dapm_paths); 992 INIT_LIST_HEAD(&codec->dapm_paths);
@@ -1007,7 +1007,7 @@ static int wm8580_probe(struct platform_device *pdev)
1007static int wm8580_remove(struct platform_device *pdev) 1007static int wm8580_remove(struct platform_device *pdev)
1008{ 1008{
1009 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 1009 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
1010 struct snd_soc_codec *codec = socdev->codec; 1010 struct snd_soc_codec *codec = socdev->card->codec;
1011 1011
1012 if (codec->control_data) 1012 if (codec->control_data)
1013 wm8580_set_bias_level(codec, SND_SOC_BIAS_OFF); 1013 wm8580_set_bias_level(codec, SND_SOC_BIAS_OFF);