Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: wm_hubs: 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>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Lars-Peter Clausen and committed by
Mark Brown
0201e505 72718517

+5 -5
+5 -5
sound/soc/codecs/wm_hubs.c
··· 500 500 static int hp_supply_event(struct snd_soc_dapm_widget *w, 501 501 struct snd_kcontrol *kcontrol, int event) 502 502 { 503 - struct snd_soc_codec *codec = w->codec; 503 + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); 504 504 struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); 505 505 506 506 switch (event) { ··· 542 542 static int hp_event(struct snd_soc_dapm_widget *w, 543 543 struct snd_kcontrol *kcontrol, int event) 544 544 { 545 - struct snd_soc_codec *codec = w->codec; 545 + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); 546 546 unsigned int reg = snd_soc_read(codec, WM8993_ANALOGUE_HP_0); 547 547 548 548 switch (event) { ··· 594 594 static int earpiece_event(struct snd_soc_dapm_widget *w, 595 595 struct snd_kcontrol *control, int event) 596 596 { 597 - struct snd_soc_codec *codec = w->codec; 597 + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); 598 598 u16 reg = snd_soc_read(codec, WM8993_ANTIPOP1) & ~WM8993_HPOUT2_IN_ENA; 599 599 600 600 switch (event) { ··· 619 619 static int lineout_event(struct snd_soc_dapm_widget *w, 620 620 struct snd_kcontrol *control, int event) 621 621 { 622 - struct snd_soc_codec *codec = w->codec; 622 + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); 623 623 struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); 624 624 bool *flag; 625 625 ··· 649 649 static int micbias_event(struct snd_soc_dapm_widget *w, 650 650 struct snd_kcontrol *kcontrol, int event) 651 651 { 652 - struct snd_soc_codec *codec = w->codec; 652 + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); 653 653 struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); 654 654 655 655 switch (w->shift) {