diff options
| author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-15 06:52:10 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2015-01-15 06:57:06 -0500 |
| commit | 76f17f185e18ac858c7d20cc079f978630e50746 (patch) | |
| tree | bf9b6dd5e2124bfa355f45c02e1a53b485137dab | |
| parent | 0bb043f523f1c226c05f8d919407fb07b1578884 (diff) | |
ASoC: rt286: 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/rt286.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index 2cd4fe463102..99dcfec4834a 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c | |||
| @@ -403,7 +403,8 @@ EXPORT_SYMBOL_GPL(rt286_mic_detect); | |||
| 403 | static int is_mclk_mode(struct snd_soc_dapm_widget *source, | 403 | static int is_mclk_mode(struct snd_soc_dapm_widget *source, |
| 404 | struct snd_soc_dapm_widget *sink) | 404 | struct snd_soc_dapm_widget *sink) |
| 405 | { | 405 | { |
| 406 | struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(source->codec); | 406 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); |
| 407 | struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec); | ||
| 407 | 408 | ||
| 408 | if (rt286->clk_id == RT286_SCLK_S_MCLK) | 409 | if (rt286->clk_id == RT286_SCLK_S_MCLK) |
| 409 | return 1; | 410 | return 1; |
| @@ -500,7 +501,7 @@ SOC_DAPM_ENUM("SPO source", rt286_spo_enum); | |||
| 500 | static int rt286_spk_event(struct snd_soc_dapm_widget *w, | 501 | static int rt286_spk_event(struct snd_soc_dapm_widget *w, |
| 501 | struct snd_kcontrol *kcontrol, int event) | 502 | struct snd_kcontrol *kcontrol, int event) |
| 502 | { | 503 | { |
| 503 | struct snd_soc_codec *codec = w->codec; | 504 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
| 504 | 505 | ||
| 505 | switch (event) { | 506 | switch (event) { |
| 506 | case SND_SOC_DAPM_POST_PMU: | 507 | case SND_SOC_DAPM_POST_PMU: |
| @@ -522,7 +523,7 @@ static int rt286_spk_event(struct snd_soc_dapm_widget *w, | |||
| 522 | static int rt286_set_dmic1_event(struct snd_soc_dapm_widget *w, | 523 | static int rt286_set_dmic1_event(struct snd_soc_dapm_widget *w, |
| 523 | struct snd_kcontrol *kcontrol, int event) | 524 | struct snd_kcontrol *kcontrol, int event) |
| 524 | { | 525 | { |
| 525 | struct snd_soc_codec *codec = w->codec; | 526 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
| 526 | 527 | ||
| 527 | switch (event) { | 528 | switch (event) { |
| 528 | case SND_SOC_DAPM_POST_PMU: | 529 | case SND_SOC_DAPM_POST_PMU: |
| @@ -541,7 +542,7 @@ static int rt286_set_dmic1_event(struct snd_soc_dapm_widget *w, | |||
| 541 | static int rt286_adc_event(struct snd_soc_dapm_widget *w, | 542 | static int rt286_adc_event(struct snd_soc_dapm_widget *w, |
| 542 | struct snd_kcontrol *kcontrol, int event) | 543 | struct snd_kcontrol *kcontrol, int event) |
| 543 | { | 544 | { |
| 544 | struct snd_soc_codec *codec = w->codec; | 545 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
| 545 | unsigned int nid; | 546 | unsigned int nid; |
| 546 | 547 | ||
| 547 | nid = (w->reg >> 20) & 0xff; | 548 | nid = (w->reg >> 20) & 0xff; |
| @@ -567,7 +568,7 @@ static int rt286_adc_event(struct snd_soc_dapm_widget *w, | |||
| 567 | static int rt286_vref_event(struct snd_soc_dapm_widget *w, | 568 | static int rt286_vref_event(struct snd_soc_dapm_widget *w, |
| 568 | struct snd_kcontrol *kcontrol, int event) | 569 | struct snd_kcontrol *kcontrol, int event) |
| 569 | { | 570 | { |
| 570 | struct snd_soc_codec *codec = w->codec; | 571 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
| 571 | 572 | ||
| 572 | switch (event) { | 573 | switch (event) { |
| 573 | case SND_SOC_DAPM_PRE_PMU: | 574 | case SND_SOC_DAPM_PRE_PMU: |
| @@ -585,7 +586,7 @@ static int rt286_vref_event(struct snd_soc_dapm_widget *w, | |||
| 585 | static int rt286_ldo2_event(struct snd_soc_dapm_widget *w, | 586 | static int rt286_ldo2_event(struct snd_soc_dapm_widget *w, |
| 586 | struct snd_kcontrol *kcontrol, int event) | 587 | struct snd_kcontrol *kcontrol, int event) |
| 587 | { | 588 | { |
| 588 | struct snd_soc_codec *codec = w->codec; | 589 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
| 589 | 590 | ||
| 590 | switch (event) { | 591 | switch (event) { |
| 591 | case SND_SOC_DAPM_POST_PMU: | 592 | case SND_SOC_DAPM_POST_PMU: |
| @@ -604,7 +605,7 @@ static int rt286_ldo2_event(struct snd_soc_dapm_widget *w, | |||
| 604 | static int rt286_mic1_event(struct snd_soc_dapm_widget *w, | 605 | static int rt286_mic1_event(struct snd_soc_dapm_widget *w, |
| 605 | struct snd_kcontrol *kcontrol, int event) | 606 | struct snd_kcontrol *kcontrol, int event) |
| 606 | { | 607 | { |
| 607 | struct snd_soc_codec *codec = w->codec; | 608 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); |
| 608 | 609 | ||
| 609 | switch (event) { | 610 | switch (event) { |
| 610 | case SND_SOC_DAPM_PRE_PMU: | 611 | case SND_SOC_DAPM_PRE_PMU: |
