aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8750.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/wm8750.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/wm8750.c')
-rw-r--r--sound/soc/codecs/wm8750.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 1578569793a2..96afb86addc6 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -604,7 +604,7 @@ static int wm8750_pcm_hw_params(struct snd_pcm_substream *substream,
604{ 604{
605 struct snd_soc_pcm_runtime *rtd = substream->private_data; 605 struct snd_soc_pcm_runtime *rtd = substream->private_data;
606 struct snd_soc_device *socdev = rtd->socdev; 606 struct snd_soc_device *socdev = rtd->socdev;
607 struct snd_soc_codec *codec = socdev->codec; 607 struct snd_soc_codec *codec = socdev->card->codec;
608 struct wm8750_priv *wm8750 = codec->private_data; 608 struct wm8750_priv *wm8750 = codec->private_data;
609 u16 iface = wm8750_read_reg_cache(codec, WM8750_IFACE) & 0x1f3; 609 u16 iface = wm8750_read_reg_cache(codec, WM8750_IFACE) & 0x1f3;
610 u16 srate = wm8750_read_reg_cache(codec, WM8750_SRATE) & 0x1c0; 610 u16 srate = wm8750_read_reg_cache(codec, WM8750_SRATE) & 0x1c0;
@@ -712,7 +712,7 @@ static void wm8750_work(struct work_struct *work)
712static int wm8750_suspend(struct platform_device *pdev, pm_message_t state) 712static int wm8750_suspend(struct platform_device *pdev, pm_message_t state)
713{ 713{
714 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 714 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
715 struct snd_soc_codec *codec = socdev->codec; 715 struct snd_soc_codec *codec = socdev->card->codec;
716 716
717 wm8750_set_bias_level(codec, SND_SOC_BIAS_OFF); 717 wm8750_set_bias_level(codec, SND_SOC_BIAS_OFF);
718 return 0; 718 return 0;
@@ -721,7 +721,7 @@ static int wm8750_suspend(struct platform_device *pdev, pm_message_t state)
721static int wm8750_resume(struct platform_device *pdev) 721static int wm8750_resume(struct platform_device *pdev)
722{ 722{
723 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 723 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
724 struct snd_soc_codec *codec = socdev->codec; 724 struct snd_soc_codec *codec = socdev->card->codec;
725 int i; 725 int i;
726 u8 data[2]; 726 u8 data[2];
727 u16 *cache = codec->reg_cache; 727 u16 *cache = codec->reg_cache;
@@ -754,7 +754,7 @@ static int wm8750_resume(struct platform_device *pdev)
754 */ 754 */
755static int wm8750_init(struct snd_soc_device *socdev) 755static int wm8750_init(struct snd_soc_device *socdev)
756{ 756{
757 struct snd_soc_codec *codec = socdev->codec; 757 struct snd_soc_codec *codec = socdev->card->codec;
758 int reg, ret = 0; 758 int reg, ret = 0;
759 759
760 codec->name = "WM8750"; 760 codec->name = "WM8750";
@@ -836,7 +836,7 @@ static int wm8750_i2c_probe(struct i2c_client *i2c,
836 const struct i2c_device_id *id) 836 const struct i2c_device_id *id)
837{ 837{
838 struct snd_soc_device *socdev = wm8750_socdev; 838 struct snd_soc_device *socdev = wm8750_socdev;
839 struct snd_soc_codec *codec = socdev->codec; 839 struct snd_soc_codec *codec = socdev->card->codec;
840 int ret; 840 int ret;
841 841
842 i2c_set_clientdata(i2c, codec); 842 i2c_set_clientdata(i2c, codec);
@@ -917,7 +917,7 @@ err_driver:
917static int __devinit wm8750_spi_probe(struct spi_device *spi) 917static int __devinit wm8750_spi_probe(struct spi_device *spi)
918{ 918{
919 struct snd_soc_device *socdev = wm8750_socdev; 919 struct snd_soc_device *socdev = wm8750_socdev;
920 struct snd_soc_codec *codec = socdev->codec; 920 struct snd_soc_codec *codec = socdev->card->codec;
921 int ret; 921 int ret;
922 922
923 codec->control_data = spi; 923 codec->control_data = spi;
@@ -989,7 +989,7 @@ static int wm8750_probe(struct platform_device *pdev)
989 } 989 }
990 990
991 codec->private_data = wm8750; 991 codec->private_data = wm8750;
992 socdev->codec = codec; 992 socdev->card->codec = codec;
993 mutex_init(&codec->mutex); 993 mutex_init(&codec->mutex);
994 INIT_LIST_HEAD(&codec->dapm_widgets); 994 INIT_LIST_HEAD(&codec->dapm_widgets);
995 INIT_LIST_HEAD(&codec->dapm_paths); 995 INIT_LIST_HEAD(&codec->dapm_paths);
@@ -1043,7 +1043,7 @@ static int run_delayed_work(struct delayed_work *dwork)
1043static int wm8750_remove(struct platform_device *pdev) 1043static int wm8750_remove(struct platform_device *pdev)
1044{ 1044{
1045 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 1045 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
1046 struct snd_soc_codec *codec = socdev->codec; 1046 struct snd_soc_codec *codec = socdev->card->codec;
1047 1047
1048 if (codec->control_data) 1048 if (codec->control_data)
1049 wm8750_set_bias_level(codec, SND_SOC_BIAS_OFF); 1049 wm8750_set_bias_level(codec, SND_SOC_BIAS_OFF);