diff options
Diffstat (limited to 'sound/soc/codecs/wm8971.c')
-rw-r--r-- | sound/soc/codecs/wm8971.c | 14 |
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) | |||
637 | static int wm8971_suspend(struct platform_device *pdev, pm_message_t state) | 637 | static 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) | |||
646 | static int wm8971_resume(struct platform_device *pdev) | 646 | static 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 | ||
678 | static int wm8971_init(struct snd_soc_device *socdev) | 678 | static 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) | |||
894 | static int wm8971_remove(struct platform_device *pdev) | 894 | static 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); |