Commit b3c25fb7 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: dapm_widget_show_codec: Use component instead of CODEC

There is nothing snd_soc_codec specific in this function, just use
snd_soc_component instead.

With this also the last reference of snd_soc_codec form soc-dapm.c.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c68c2be5
...@@ -2220,14 +2220,16 @@ int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_context *dapm, ...@@ -2220,14 +2220,16 @@ int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_context *dapm,
} }
EXPORT_SYMBOL_GPL(snd_soc_dapm_mixer_update_power); EXPORT_SYMBOL_GPL(snd_soc_dapm_mixer_update_power);
static ssize_t dapm_widget_show_codec(struct snd_soc_codec *codec, char *buf) static ssize_t dapm_widget_show_component(struct snd_soc_component *cmpnt,
char *buf)
{ {
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cmpnt);
struct snd_soc_dapm_widget *w; struct snd_soc_dapm_widget *w;
int count = 0; int count = 0;
char *state = "not set"; char *state = "not set";
list_for_each_entry(w, &codec->component.card->widgets, list) { list_for_each_entry(w, &cmpnt->card->widgets, list) {
if (w->dapm != &codec->dapm) if (w->dapm != dapm)
continue; continue;
/* only display widgets that burnm power */ /* only display widgets that burnm power */
...@@ -2255,7 +2257,7 @@ static ssize_t dapm_widget_show_codec(struct snd_soc_codec *codec, char *buf) ...@@ -2255,7 +2257,7 @@ static ssize_t dapm_widget_show_codec(struct snd_soc_codec *codec, char *buf)
} }
} }
switch (codec->dapm.bias_level) { switch (snd_soc_dapm_get_bias_level(dapm)) {
case SND_SOC_BIAS_ON: case SND_SOC_BIAS_ON:
state = "On"; state = "On";
break; break;
...@@ -2282,8 +2284,9 @@ static ssize_t dapm_widget_show(struct device *dev, ...@@ -2282,8 +2284,9 @@ static ssize_t dapm_widget_show(struct device *dev,
int i, count = 0; int i, count = 0;
for (i = 0; i < rtd->num_codecs; i++) { for (i = 0; i < rtd->num_codecs; i++) {
struct snd_soc_codec *codec = rtd->codec_dais[i]->codec; struct snd_soc_component *cmpnt = rtd->codec_dais[i]->component;
count += dapm_widget_show_codec(codec, buf + count);
count += dapm_widget_show_component(cmpnt, buf + count);
} }
return count; return count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment