aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8971.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/wm8971.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/wm8971.c')
-rw-r--r--sound/soc/codecs/wm8971.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c
index c8bd9b06f330..24d4c905a011 100644
--- a/sound/soc/codecs/wm8971.c
+++ b/sound/soc/codecs/wm8971.c
@@ -531,7 +531,7 @@ static int wm8971_pcm_hw_params(struct snd_pcm_substream *substream,
531{ 531{
532 struct snd_soc_pcm_runtime *rtd = substream->private_data; 532 struct snd_soc_pcm_runtime *rtd = substream->private_data;
533 struct snd_soc_device *socdev = rtd->socdev; 533 struct snd_soc_device *socdev = rtd->socdev;
534 struct snd_soc_codec *codec = socdev->codec; 534 struct snd_soc_codec *codec = socdev->card->codec;
535 struct wm8971_priv *wm8971 = codec->private_data; 535 struct wm8971_priv *wm8971 = codec->private_data;
536 u16 iface = wm8971_read_reg_cache(codec, WM8971_IFACE) & 0x1f3; 536 u16 iface = wm8971_read_reg_cache(codec, WM8971_IFACE) & 0x1f3;
537 u16 srate = wm8971_read_reg_cache(codec, WM8971_SRATE) & 0x1c0; 537 u16 srate = wm8971_read_reg_cache(codec, WM8971_SRATE) & 0x1c0;
@@ -637,7 +637,7 @@ static void wm8971_work(struct work_struct *work)
637static int wm8971_suspend(struct platform_device *pdev, pm_message_t state) 637static int wm8971_suspend(struct platform_device *pdev, pm_message_t state)
638{ 638{
639 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 639 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
640 struct snd_soc_codec *codec = socdev->codec; 640 struct snd_soc_codec *codec = socdev->card->codec;
641 641
642 wm8971_set_bias_level(codec, SND_SOC_BIAS_OFF); 642 wm8971_set_bias_level(codec, SND_SOC_BIAS_OFF);
643 return 0; 643 return 0;
@@ -646,7 +646,7 @@ static int wm8971_suspend(struct platform_device *pdev, pm_message_t state)
646static int wm8971_resume(struct platform_device *pdev) 646static int wm8971_resume(struct platform_device *pdev)
647{ 647{
648 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 648 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
649 struct snd_soc_codec *codec = socdev->codec; 649 struct snd_soc_codec *codec = socdev->card->codec;
650 int i; 650 int i;
651 u8 data[2]; 651 u8 data[2];
652 u16 *cache = codec->reg_cache; 652 u16 *cache = codec->reg_cache;
@@ -677,7 +677,7 @@ static int wm8971_resume(struct platform_device *pdev)
677 677
678static int wm8971_init(struct snd_soc_device *socdev) 678static int wm8971_init(struct snd_soc_device *socdev)
679{ 679{
680 struct snd_soc_codec *codec = socdev->codec; 680 struct snd_soc_codec *codec = socdev->card->codec;
681 int reg, ret = 0; 681 int reg, ret = 0;
682 682
683 codec->name = "WM8971"; 683 codec->name = "WM8971";
@@ -758,7 +758,7 @@ static int wm8971_i2c_probe(struct i2c_client *i2c,
758 const struct i2c_device_id *id) 758 const struct i2c_device_id *id)
759{ 759{
760 struct snd_soc_device *socdev = wm8971_socdev; 760 struct snd_soc_device *socdev = wm8971_socdev;
761 struct snd_soc_codec *codec = socdev->codec; 761 struct snd_soc_codec *codec = socdev->card->codec;
762 int ret; 762 int ret;
763 763
764 i2c_set_clientdata(i2c, codec); 764 i2c_set_clientdata(i2c, codec);
@@ -859,7 +859,7 @@ static int wm8971_probe(struct platform_device *pdev)
859 } 859 }
860 860
861 codec->private_data = wm8971; 861 codec->private_data = wm8971;
862 socdev->codec = codec; 862 socdev->card->codec = codec;
863 mutex_init(&codec->mutex); 863 mutex_init(&codec->mutex);
864 INIT_LIST_HEAD(&codec->dapm_widgets); 864 INIT_LIST_HEAD(&codec->dapm_widgets);
865 INIT_LIST_HEAD(&codec->dapm_paths); 865 INIT_LIST_HEAD(&codec->dapm_paths);
@@ -894,7 +894,7 @@ static int wm8971_probe(struct platform_device *pdev)
894static int wm8971_remove(struct platform_device *pdev) 894static int wm8971_remove(struct platform_device *pdev)
895{ 895{
896 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 896 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
897 struct snd_soc_codec *codec = socdev->codec; 897 struct snd_soc_codec *codec = socdev->card->codec;
898 898
899 if (codec->control_data) 899 if (codec->control_data)
900 wm8971_set_bias_level(codec, SND_SOC_BIAS_OFF); 900 wm8971_set_bias_level(codec, SND_SOC_BIAS_OFF);