diff options
Diffstat (limited to 'sound/soc/codecs/wm8731.c')
-rw-r--r-- | sound/soc/codecs/wm8731.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index d5e1c5b681e..63f90c4ad93 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -224,7 +224,7 @@ static int wm8731_hw_params(struct snd_pcm_substream *substream, | |||
224 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 224 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
225 | struct snd_soc_device *socdev = rtd->socdev; | 225 | struct snd_soc_device *socdev = rtd->socdev; |
226 | struct snd_soc_codec *codec = socdev->card->codec; | 226 | struct snd_soc_codec *codec = socdev->card->codec; |
227 | struct wm8731_priv *wm8731 = codec->private_data; | 227 | struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); |
228 | u16 iface = snd_soc_read(codec, WM8731_IFACE) & 0xfff3; | 228 | u16 iface = snd_soc_read(codec, WM8731_IFACE) & 0xfff3; |
229 | int i = get_coeff(wm8731->sysclk, params_rate(params)); | 229 | int i = get_coeff(wm8731->sysclk, params_rate(params)); |
230 | u16 srate = (coeff_div[i].sr << 2) | | 230 | u16 srate = (coeff_div[i].sr << 2) | |
@@ -291,7 +291,7 @@ static int wm8731_set_dai_sysclk(struct snd_soc_dai *codec_dai, | |||
291 | int clk_id, unsigned int freq, int dir) | 291 | int clk_id, unsigned int freq, int dir) |
292 | { | 292 | { |
293 | struct snd_soc_codec *codec = codec_dai->codec; | 293 | struct snd_soc_codec *codec = codec_dai->codec; |
294 | struct wm8731_priv *wm8731 = codec->private_data; | 294 | struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); |
295 | 295 | ||
296 | switch (freq) { | 296 | switch (freq) { |
297 | case 11289600: | 297 | case 11289600: |
@@ -427,7 +427,7 @@ static int wm8731_suspend(struct platform_device *pdev, pm_message_t state) | |||
427 | { | 427 | { |
428 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 428 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
429 | struct snd_soc_codec *codec = socdev->card->codec; | 429 | struct snd_soc_codec *codec = socdev->card->codec; |
430 | struct wm8731_priv *wm8731 = codec->private_data; | 430 | struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); |
431 | 431 | ||
432 | snd_soc_write(codec, WM8731_ACTIVE, 0x0); | 432 | snd_soc_write(codec, WM8731_ACTIVE, 0x0); |
433 | wm8731_set_bias_level(codec, SND_SOC_BIAS_OFF); | 433 | wm8731_set_bias_level(codec, SND_SOC_BIAS_OFF); |
@@ -440,7 +440,7 @@ static int wm8731_resume(struct platform_device *pdev) | |||
440 | { | 440 | { |
441 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 441 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
442 | struct snd_soc_codec *codec = socdev->card->codec; | 442 | struct snd_soc_codec *codec = socdev->card->codec; |
443 | struct wm8731_priv *wm8731 = codec->private_data; | 443 | struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); |
444 | int i, ret; | 444 | int i, ret; |
445 | u8 data[2]; | 445 | u8 data[2]; |
446 | u16 *cache = codec->reg_cache; | 446 | u16 *cache = codec->reg_cache; |
@@ -535,7 +535,7 @@ static int wm8731_register(struct wm8731_priv *wm8731, | |||
535 | INIT_LIST_HEAD(&codec->dapm_widgets); | 535 | INIT_LIST_HEAD(&codec->dapm_widgets); |
536 | INIT_LIST_HEAD(&codec->dapm_paths); | 536 | INIT_LIST_HEAD(&codec->dapm_paths); |
537 | 537 | ||
538 | codec->private_data = wm8731; | 538 | snd_soc_codec_set_drvdata(codec, wm8731); |
539 | codec->name = "WM8731"; | 539 | codec->name = "WM8731"; |
540 | codec->owner = THIS_MODULE; | 540 | codec->owner = THIS_MODULE; |
541 | codec->bias_level = SND_SOC_BIAS_OFF; | 541 | codec->bias_level = SND_SOC_BIAS_OFF; |