diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-15 06:52:12 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-15 06:57:06 -0500 |
commit | bb1cd608b1198a8c24fe56074b9d93df393ee9a7 (patch) | |
tree | 260fce059f8ef6fc310a68aa43fc7dfd9735991d | |
parent | 4389eb29078f1ab35e65d0386e342ec043389e49 (diff) |
ASoC: rt5640: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/rt5640.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index c3f2decd643c..b386958de042 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c | |||
@@ -458,7 +458,7 @@ static const struct snd_kcontrol_new rt5640_specific_snd_controls[] = { | |||
458 | static int set_dmic_clk(struct snd_soc_dapm_widget *w, | 458 | static int set_dmic_clk(struct snd_soc_dapm_widget *w, |
459 | struct snd_kcontrol *kcontrol, int event) | 459 | struct snd_kcontrol *kcontrol, int event) |
460 | { | 460 | { |
461 | struct snd_soc_codec *codec = w->codec; | 461 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
462 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); | 462 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); |
463 | int idx = -EINVAL; | 463 | int idx = -EINVAL; |
464 | 464 | ||
@@ -475,9 +475,10 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w, | |||
475 | static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source, | 475 | static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source, |
476 | struct snd_soc_dapm_widget *sink) | 476 | struct snd_soc_dapm_widget *sink) |
477 | { | 477 | { |
478 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); | ||
478 | unsigned int val; | 479 | unsigned int val; |
479 | 480 | ||
480 | val = snd_soc_read(source->codec, RT5640_GLB_CLK); | 481 | val = snd_soc_read(codec, RT5640_GLB_CLK); |
481 | val &= RT5640_SCLK_SRC_MASK; | 482 | val &= RT5640_SCLK_SRC_MASK; |
482 | if (val == RT5640_SCLK_SRC_PLL1) | 483 | if (val == RT5640_SCLK_SRC_PLL1) |
483 | return 1; | 484 | return 1; |
@@ -963,7 +964,7 @@ static void rt5640_pmu_depop(struct snd_soc_codec *codec) | |||
963 | static int rt5640_hp_event(struct snd_soc_dapm_widget *w, | 964 | static int rt5640_hp_event(struct snd_soc_dapm_widget *w, |
964 | struct snd_kcontrol *kcontrol, int event) | 965 | struct snd_kcontrol *kcontrol, int event) |
965 | { | 966 | { |
966 | struct snd_soc_codec *codec = w->codec; | 967 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
967 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); | 968 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); |
968 | 969 | ||
969 | switch (event) { | 970 | switch (event) { |
@@ -987,7 +988,7 @@ static int rt5640_hp_event(struct snd_soc_dapm_widget *w, | |||
987 | static int rt5640_hp_power_event(struct snd_soc_dapm_widget *w, | 988 | static int rt5640_hp_power_event(struct snd_soc_dapm_widget *w, |
988 | struct snd_kcontrol *kcontrol, int event) | 989 | struct snd_kcontrol *kcontrol, int event) |
989 | { | 990 | { |
990 | struct snd_soc_codec *codec = w->codec; | 991 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
991 | 992 | ||
992 | switch (event) { | 993 | switch (event) { |
993 | case SND_SOC_DAPM_POST_PMU: | 994 | case SND_SOC_DAPM_POST_PMU: |
@@ -1003,7 +1004,7 @@ static int rt5640_hp_power_event(struct snd_soc_dapm_widget *w, | |||
1003 | static int rt5640_hp_post_event(struct snd_soc_dapm_widget *w, | 1004 | static int rt5640_hp_post_event(struct snd_soc_dapm_widget *w, |
1004 | struct snd_kcontrol *kcontrol, int event) | 1005 | struct snd_kcontrol *kcontrol, int event) |
1005 | { | 1006 | { |
1006 | struct snd_soc_codec *codec = w->codec; | 1007 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
1007 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); | 1008 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); |
1008 | 1009 | ||
1009 | switch (event) { | 1010 | switch (event) { |