aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8711.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8711.c')
-rw-r--r--sound/soc/codecs/wm8711.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c
index 24a35603bcf7..effb14eee7d4 100644
--- a/sound/soc/codecs/wm8711.c
+++ b/sound/soc/codecs/wm8711.c
@@ -20,6 +20,7 @@
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/spi/spi.h> 22#include <linux/spi/spi.h>
23#include <linux/slab.h>
23#include <sound/core.h> 24#include <sound/core.h>
24#include <sound/pcm.h> 25#include <sound/pcm.h>
25#include <sound/pcm_params.h> 26#include <sound/pcm_params.h>
@@ -162,7 +163,7 @@ static int wm8711_hw_params(struct snd_pcm_substream *substream,
162 struct snd_soc_dai *dai) 163 struct snd_soc_dai *dai)
163{ 164{
164 struct snd_soc_codec *codec = dai->codec; 165 struct snd_soc_codec *codec = dai->codec;
165 struct wm8711_priv *wm8711 = codec->private_data; 166 struct wm8711_priv *wm8711 = snd_soc_codec_get_drvdata(codec);
166 u16 iface = snd_soc_read(codec, WM8711_IFACE) & 0xfffc; 167 u16 iface = snd_soc_read(codec, WM8711_IFACE) & 0xfffc;
167 int i = get_coeff(wm8711->sysclk, params_rate(params)); 168 int i = get_coeff(wm8711->sysclk, params_rate(params));
168 u16 srate = (coeff_div[i].sr << 2) | 169 u16 srate = (coeff_div[i].sr << 2) |
@@ -226,7 +227,7 @@ static int wm8711_set_dai_sysclk(struct snd_soc_dai *codec_dai,
226 int clk_id, unsigned int freq, int dir) 227 int clk_id, unsigned int freq, int dir)
227{ 228{
228 struct snd_soc_codec *codec = codec_dai->codec; 229 struct snd_soc_codec *codec = codec_dai->codec;
229 struct wm8711_priv *wm8711 = codec->private_data; 230 struct wm8711_priv *wm8711 = snd_soc_codec_get_drvdata(codec);
230 231
231 switch (freq) { 232 switch (freq) {
232 case 11289600: 233 case 11289600:
@@ -375,7 +376,7 @@ static int wm8711_resume(struct platform_device *pdev)
375 codec->hw_write(codec->control_data, data, 2); 376 codec->hw_write(codec->control_data, data, 2);
376 } 377 }
377 wm8711_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 378 wm8711_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
378 wm8711_set_bias_level(codec, codec->suspend_bias_level); 379
379 return 0; 380 return 0;
380} 381}
381 382
@@ -445,7 +446,7 @@ static int wm8711_register(struct wm8711_priv *wm8711,
445 INIT_LIST_HEAD(&codec->dapm_widgets); 446 INIT_LIST_HEAD(&codec->dapm_widgets);
446 INIT_LIST_HEAD(&codec->dapm_paths); 447 INIT_LIST_HEAD(&codec->dapm_paths);
447 448
448 codec->private_data = wm8711; 449 snd_soc_codec_set_drvdata(codec, wm8711);
449 codec->name = "WM8711"; 450 codec->name = "WM8711";
450 codec->owner = THIS_MODULE; 451 codec->owner = THIS_MODULE;
451 codec->bias_level = SND_SOC_BIAS_OFF; 452 codec->bias_level = SND_SOC_BIAS_OFF;