Commit f68d7e16 authored by Mark Brown's avatar Mark Brown

ASoC: Stop checking for supplied widgets after we find the first

We don't really care how many widgets a supply is supplying, we just care
if the number is non-zero. This didn't actually produce any improvement
in the test cases I've been using but seems obviously sensible enough that
I'm pushing it out anyway.

We could do a similar thing for other widgets but this may be unhelpful
for further refactorings Liam was working on aiming to allow us to
identify connected audio paths.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent f3bf3e45
...@@ -851,7 +851,6 @@ static int dapm_dac_check_power(struct snd_soc_dapm_widget *w) ...@@ -851,7 +851,6 @@ static int dapm_dac_check_power(struct snd_soc_dapm_widget *w)
static int dapm_supply_check_power(struct snd_soc_dapm_widget *w) static int dapm_supply_check_power(struct snd_soc_dapm_widget *w)
{ {
struct snd_soc_dapm_path *path; struct snd_soc_dapm_path *path;
int power = 0;
DAPM_UPDATE_STAT(w, power_checks); DAPM_UPDATE_STAT(w, power_checks);
...@@ -869,15 +868,13 @@ static int dapm_supply_check_power(struct snd_soc_dapm_widget *w) ...@@ -869,15 +868,13 @@ static int dapm_supply_check_power(struct snd_soc_dapm_widget *w)
if (!path->sink) if (!path->sink)
continue; continue;
if (dapm_widget_power_check(path->sink)) { if (dapm_widget_power_check(path->sink))
power = 1; return 1;
break;
}
} }
dapm_clear_walk(w->dapm); dapm_clear_walk(w->dapm);
return power; return 0;
} }
static int dapm_always_on_check_power(struct snd_soc_dapm_widget *w) static int dapm_always_on_check_power(struct snd_soc_dapm_widget *w)
......
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