diff options
Diffstat (limited to 'sound/soc/codecs/wm8753.c')
-rw-r--r-- | sound/soc/codecs/wm8753.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 5a1c1fca120f..502766dce861 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
@@ -912,7 +912,7 @@ static int wm8753_pcm_hw_params(struct snd_pcm_substream *substream, | |||
912 | { | 912 | { |
913 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 913 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
914 | struct snd_soc_device *socdev = rtd->socdev; | 914 | struct snd_soc_device *socdev = rtd->socdev; |
915 | struct snd_soc_codec *codec = socdev->codec; | 915 | struct snd_soc_codec *codec = socdev->card->codec; |
916 | struct wm8753_priv *wm8753 = codec->private_data; | 916 | struct wm8753_priv *wm8753 = codec->private_data; |
917 | u16 voice = wm8753_read_reg_cache(codec, WM8753_PCM) & 0x01f3; | 917 | u16 voice = wm8753_read_reg_cache(codec, WM8753_PCM) & 0x01f3; |
918 | u16 srate = wm8753_read_reg_cache(codec, WM8753_SRATE1) & 0x017f; | 918 | u16 srate = wm8753_read_reg_cache(codec, WM8753_SRATE1) & 0x017f; |
@@ -1146,7 +1146,7 @@ static int wm8753_i2s_hw_params(struct snd_pcm_substream *substream, | |||
1146 | { | 1146 | { |
1147 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 1147 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
1148 | struct snd_soc_device *socdev = rtd->socdev; | 1148 | struct snd_soc_device *socdev = rtd->socdev; |
1149 | struct snd_soc_codec *codec = socdev->codec; | 1149 | struct snd_soc_codec *codec = socdev->card->codec; |
1150 | struct wm8753_priv *wm8753 = codec->private_data; | 1150 | struct wm8753_priv *wm8753 = codec->private_data; |
1151 | u16 srate = wm8753_read_reg_cache(codec, WM8753_SRATE1) & 0x01c0; | 1151 | u16 srate = wm8753_read_reg_cache(codec, WM8753_SRATE1) & 0x01c0; |
1152 | u16 hifi = wm8753_read_reg_cache(codec, WM8753_HIFI) & 0x01f3; | 1152 | u16 hifi = wm8753_read_reg_cache(codec, WM8753_HIFI) & 0x01f3; |
@@ -1483,7 +1483,7 @@ static void wm8753_work(struct work_struct *work) | |||
1483 | static int wm8753_suspend(struct platform_device *pdev, pm_message_t state) | 1483 | static int wm8753_suspend(struct platform_device *pdev, pm_message_t state) |
1484 | { | 1484 | { |
1485 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 1485 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
1486 | struct snd_soc_codec *codec = socdev->codec; | 1486 | struct snd_soc_codec *codec = socdev->card->codec; |
1487 | 1487 | ||
1488 | /* we only need to suspend if we are a valid card */ | 1488 | /* we only need to suspend if we are a valid card */ |
1489 | if (!codec->card) | 1489 | if (!codec->card) |
@@ -1496,7 +1496,7 @@ static int wm8753_suspend(struct platform_device *pdev, pm_message_t state) | |||
1496 | static int wm8753_resume(struct platform_device *pdev) | 1496 | static int wm8753_resume(struct platform_device *pdev) |
1497 | { | 1497 | { |
1498 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 1498 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
1499 | struct snd_soc_codec *codec = socdev->codec; | 1499 | struct snd_soc_codec *codec = socdev->card->codec; |
1500 | int i; | 1500 | int i; |
1501 | u8 data[2]; | 1501 | u8 data[2]; |
1502 | u16 *cache = codec->reg_cache; | 1502 | u16 *cache = codec->reg_cache; |
@@ -1533,7 +1533,7 @@ static int wm8753_resume(struct platform_device *pdev) | |||
1533 | */ | 1533 | */ |
1534 | static int wm8753_init(struct snd_soc_device *socdev) | 1534 | static int wm8753_init(struct snd_soc_device *socdev) |
1535 | { | 1535 | { |
1536 | struct snd_soc_codec *codec = socdev->codec; | 1536 | struct snd_soc_codec *codec = socdev->card->codec; |
1537 | int reg, ret = 0; | 1537 | int reg, ret = 0; |
1538 | 1538 | ||
1539 | codec->name = "WM8753"; | 1539 | codec->name = "WM8753"; |
@@ -1624,7 +1624,7 @@ static int wm8753_i2c_probe(struct i2c_client *i2c, | |||
1624 | const struct i2c_device_id *id) | 1624 | const struct i2c_device_id *id) |
1625 | { | 1625 | { |
1626 | struct snd_soc_device *socdev = wm8753_socdev; | 1626 | struct snd_soc_device *socdev = wm8753_socdev; |
1627 | struct snd_soc_codec *codec = socdev->codec; | 1627 | struct snd_soc_codec *codec = socdev->card->codec; |
1628 | int ret; | 1628 | int ret; |
1629 | 1629 | ||
1630 | i2c_set_clientdata(i2c, codec); | 1630 | i2c_set_clientdata(i2c, codec); |
@@ -1705,7 +1705,7 @@ err_driver: | |||
1705 | static int __devinit wm8753_spi_probe(struct spi_device *spi) | 1705 | static int __devinit wm8753_spi_probe(struct spi_device *spi) |
1706 | { | 1706 | { |
1707 | struct snd_soc_device *socdev = wm8753_socdev; | 1707 | struct snd_soc_device *socdev = wm8753_socdev; |
1708 | struct snd_soc_codec *codec = socdev->codec; | 1708 | struct snd_soc_codec *codec = socdev->card->codec; |
1709 | int ret; | 1709 | int ret; |
1710 | 1710 | ||
1711 | codec->control_data = spi; | 1711 | codec->control_data = spi; |
@@ -1780,7 +1780,7 @@ static int wm8753_probe(struct platform_device *pdev) | |||
1780 | } | 1780 | } |
1781 | 1781 | ||
1782 | codec->private_data = wm8753; | 1782 | codec->private_data = wm8753; |
1783 | socdev->codec = codec; | 1783 | socdev->card->codec = codec; |
1784 | mutex_init(&codec->mutex); | 1784 | mutex_init(&codec->mutex); |
1785 | INIT_LIST_HEAD(&codec->dapm_widgets); | 1785 | INIT_LIST_HEAD(&codec->dapm_widgets); |
1786 | INIT_LIST_HEAD(&codec->dapm_paths); | 1786 | INIT_LIST_HEAD(&codec->dapm_paths); |
@@ -1832,7 +1832,7 @@ static int run_delayed_work(struct delayed_work *dwork) | |||
1832 | static int wm8753_remove(struct platform_device *pdev) | 1832 | static int wm8753_remove(struct platform_device *pdev) |
1833 | { | 1833 | { |
1834 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 1834 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
1835 | struct snd_soc_codec *codec = socdev->codec; | 1835 | struct snd_soc_codec *codec = socdev->card->codec; |
1836 | 1836 | ||
1837 | if (codec->control_data) | 1837 | if (codec->control_data) |
1838 | wm8753_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1838 | wm8753_set_bias_level(codec, SND_SOC_BIAS_OFF); |