diff options
Diffstat (limited to 'sound/soc/codecs/wm8903.c')
-rw-r--r-- | sound/soc/codecs/wm8903.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 6ff34b957dce..d36b2b1edf19 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -1261,7 +1261,7 @@ static int wm8903_startup(struct snd_pcm_substream *substream, | |||
1261 | { | 1261 | { |
1262 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 1262 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
1263 | struct snd_soc_device *socdev = rtd->socdev; | 1263 | struct snd_soc_device *socdev = rtd->socdev; |
1264 | struct snd_soc_codec *codec = socdev->codec; | 1264 | struct snd_soc_codec *codec = socdev->card->codec; |
1265 | struct wm8903_priv *wm8903 = codec->private_data; | 1265 | struct wm8903_priv *wm8903 = codec->private_data; |
1266 | struct i2c_client *i2c = codec->control_data; | 1266 | struct i2c_client *i2c = codec->control_data; |
1267 | struct snd_pcm_runtime *master_runtime; | 1267 | struct snd_pcm_runtime *master_runtime; |
@@ -1303,7 +1303,7 @@ static void wm8903_shutdown(struct snd_pcm_substream *substream, | |||
1303 | { | 1303 | { |
1304 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 1304 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
1305 | struct snd_soc_device *socdev = rtd->socdev; | 1305 | struct snd_soc_device *socdev = rtd->socdev; |
1306 | struct snd_soc_codec *codec = socdev->codec; | 1306 | struct snd_soc_codec *codec = socdev->card->codec; |
1307 | struct wm8903_priv *wm8903 = codec->private_data; | 1307 | struct wm8903_priv *wm8903 = codec->private_data; |
1308 | 1308 | ||
1309 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 1309 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
@@ -1323,7 +1323,7 @@ static int wm8903_hw_params(struct snd_pcm_substream *substream, | |||
1323 | { | 1323 | { |
1324 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 1324 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
1325 | struct snd_soc_device *socdev = rtd->socdev; | 1325 | struct snd_soc_device *socdev = rtd->socdev; |
1326 | struct snd_soc_codec *codec = socdev->codec; | 1326 | struct snd_soc_codec *codec = socdev->card->codec; |
1327 | struct wm8903_priv *wm8903 = codec->private_data; | 1327 | struct wm8903_priv *wm8903 = codec->private_data; |
1328 | struct i2c_client *i2c = codec->control_data; | 1328 | struct i2c_client *i2c = codec->control_data; |
1329 | int fs = params_rate(params); | 1329 | int fs = params_rate(params); |
@@ -1527,7 +1527,7 @@ EXPORT_SYMBOL_GPL(wm8903_dai); | |||
1527 | static int wm8903_suspend(struct platform_device *pdev, pm_message_t state) | 1527 | static int wm8903_suspend(struct platform_device *pdev, pm_message_t state) |
1528 | { | 1528 | { |
1529 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 1529 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
1530 | struct snd_soc_codec *codec = socdev->codec; | 1530 | struct snd_soc_codec *codec = socdev->card->codec; |
1531 | 1531 | ||
1532 | wm8903_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1532 | wm8903_set_bias_level(codec, SND_SOC_BIAS_OFF); |
1533 | 1533 | ||
@@ -1537,7 +1537,7 @@ static int wm8903_suspend(struct platform_device *pdev, pm_message_t state) | |||
1537 | static int wm8903_resume(struct platform_device *pdev) | 1537 | static int wm8903_resume(struct platform_device *pdev) |
1538 | { | 1538 | { |
1539 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 1539 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
1540 | struct snd_soc_codec *codec = socdev->codec; | 1540 | struct snd_soc_codec *codec = socdev->card->codec; |
1541 | struct i2c_client *i2c = codec->control_data; | 1541 | struct i2c_client *i2c = codec->control_data; |
1542 | int i; | 1542 | int i; |
1543 | u16 *reg_cache = codec->reg_cache; | 1543 | u16 *reg_cache = codec->reg_cache; |
@@ -1713,7 +1713,7 @@ static int wm8903_probe(struct platform_device *pdev) | |||
1713 | goto err; | 1713 | goto err; |
1714 | } | 1714 | } |
1715 | 1715 | ||
1716 | socdev->codec = wm8903_codec; | 1716 | socdev->card->codec = wm8903_codec; |
1717 | 1717 | ||
1718 | /* register pcms */ | 1718 | /* register pcms */ |
1719 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); | 1719 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); |
@@ -1722,9 +1722,9 @@ static int wm8903_probe(struct platform_device *pdev) | |||
1722 | goto err; | 1722 | goto err; |
1723 | } | 1723 | } |
1724 | 1724 | ||
1725 | snd_soc_add_controls(socdev->codec, wm8903_snd_controls, | 1725 | snd_soc_add_controls(socdev->card->codec, wm8903_snd_controls, |
1726 | ARRAY_SIZE(wm8903_snd_controls)); | 1726 | ARRAY_SIZE(wm8903_snd_controls)); |
1727 | wm8903_add_widgets(socdev->codec); | 1727 | wm8903_add_widgets(socdev->card->codec); |
1728 | 1728 | ||
1729 | ret = snd_soc_init_card(socdev); | 1729 | ret = snd_soc_init_card(socdev); |
1730 | if (ret < 0) { | 1730 | if (ret < 0) { |
@@ -1745,7 +1745,7 @@ err: | |||
1745 | static int wm8903_remove(struct platform_device *pdev) | 1745 | static int wm8903_remove(struct platform_device *pdev) |
1746 | { | 1746 | { |
1747 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 1747 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
1748 | struct snd_soc_codec *codec = socdev->codec; | 1748 | struct snd_soc_codec *codec = socdev->card->codec; |
1749 | 1749 | ||
1750 | if (codec->control_data) | 1750 | if (codec->control_data) |
1751 | wm8903_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1751 | wm8903_set_bias_level(codec, SND_SOC_BIAS_OFF); |