diff options
Diffstat (limited to 'sound/soc/codecs/wm8978.c')
| -rw-r--r-- | sound/soc/codecs/wm8978.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index 526f56b09066..51d5f433215c 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c | |||
| @@ -439,7 +439,7 @@ static int wm8978_enum_mclk(unsigned int f_out, unsigned int f_mclk, | |||
| 439 | */ | 439 | */ |
| 440 | static int wm8978_configure_pll(struct snd_soc_codec *codec) | 440 | static int wm8978_configure_pll(struct snd_soc_codec *codec) |
| 441 | { | 441 | { |
| 442 | struct wm8978_priv *wm8978 = codec->private_data; | 442 | struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec); |
| 443 | struct wm8978_pll_div pll_div; | 443 | struct wm8978_pll_div pll_div; |
| 444 | unsigned int f_opclk = wm8978->f_opclk, f_mclk = wm8978->f_mclk, | 444 | unsigned int f_opclk = wm8978->f_opclk, f_mclk = wm8978->f_mclk, |
| 445 | f_256fs = wm8978->f_256fs; | 445 | f_256fs = wm8978->f_256fs; |
| @@ -535,7 +535,7 @@ static int wm8978_set_dai_clkdiv(struct snd_soc_dai *codec_dai, | |||
| 535 | int div_id, int div) | 535 | int div_id, int div) |
| 536 | { | 536 | { |
| 537 | struct snd_soc_codec *codec = codec_dai->codec; | 537 | struct snd_soc_codec *codec = codec_dai->codec; |
| 538 | struct wm8978_priv *wm8978 = codec->private_data; | 538 | struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec); |
| 539 | int ret = 0; | 539 | int ret = 0; |
| 540 | 540 | ||
| 541 | switch (div_id) { | 541 | switch (div_id) { |
| @@ -580,7 +580,7 @@ static int wm8978_set_dai_sysclk(struct snd_soc_dai *codec_dai, int clk_id, | |||
| 580 | unsigned int freq, int dir) | 580 | unsigned int freq, int dir) |
| 581 | { | 581 | { |
| 582 | struct snd_soc_codec *codec = codec_dai->codec; | 582 | struct snd_soc_codec *codec = codec_dai->codec; |
| 583 | struct wm8978_priv *wm8978 = codec->private_data; | 583 | struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec); |
| 584 | int ret = 0; | 584 | int ret = 0; |
| 585 | 585 | ||
| 586 | dev_dbg(codec->dev, "%s: ID %d, freq %u\n", __func__, clk_id, freq); | 586 | dev_dbg(codec->dev, "%s: ID %d, freq %u\n", __func__, clk_id, freq); |
| @@ -692,7 +692,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream, | |||
| 692 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 692 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
| 693 | struct snd_soc_device *socdev = rtd->socdev; | 693 | struct snd_soc_device *socdev = rtd->socdev; |
| 694 | struct snd_soc_codec *codec = socdev->card->codec; | 694 | struct snd_soc_codec *codec = socdev->card->codec; |
| 695 | struct wm8978_priv *wm8978 = codec->private_data; | 695 | struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec); |
| 696 | /* Word length mask = 0x60 */ | 696 | /* Word length mask = 0x60 */ |
| 697 | u16 iface_ctl = snd_soc_read(codec, WM8978_AUDIO_INTERFACE) & ~0x60; | 697 | u16 iface_ctl = snd_soc_read(codec, WM8978_AUDIO_INTERFACE) & ~0x60; |
| 698 | /* Sampling rate mask = 0xe (for filters) */ | 698 | /* Sampling rate mask = 0xe (for filters) */ |
| @@ -912,7 +912,7 @@ static int wm8978_resume(struct platform_device *pdev) | |||
| 912 | { | 912 | { |
| 913 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 913 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
| 914 | struct snd_soc_codec *codec = socdev->card->codec; | 914 | struct snd_soc_codec *codec = socdev->card->codec; |
| 915 | struct wm8978_priv *wm8978 = codec->private_data; | 915 | struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec); |
| 916 | int i; | 916 | int i; |
| 917 | u16 *cache = codec->reg_cache; | 917 | u16 *cache = codec->reg_cache; |
| 918 | 918 | ||
| @@ -1020,7 +1020,7 @@ static __devinit int wm8978_register(struct wm8978_priv *wm8978) | |||
| 1020 | INIT_LIST_HEAD(&codec->dapm_widgets); | 1020 | INIT_LIST_HEAD(&codec->dapm_widgets); |
| 1021 | INIT_LIST_HEAD(&codec->dapm_paths); | 1021 | INIT_LIST_HEAD(&codec->dapm_paths); |
| 1022 | 1022 | ||
| 1023 | codec->private_data = wm8978; | 1023 | snd_soc_codec_set_drvdata(codec, wm8978); |
| 1024 | codec->name = "WM8978"; | 1024 | codec->name = "WM8978"; |
| 1025 | codec->owner = THIS_MODULE; | 1025 | codec->owner = THIS_MODULE; |
| 1026 | codec->bias_level = SND_SOC_BIAS_OFF; | 1026 | codec->bias_level = SND_SOC_BIAS_OFF; |
