diff options
author | Kuninori Morimoto <[email protected]> | 2022-10-19 00:36:51 +0000 |
---|---|---|
committer | Mark Brown <[email protected]> | 2022-10-19 13:05:30 +0100 |
commit | 9941ba4baed0a4388028e2ce3ff769d50324068a (patch) | |
tree | 6a1edb1b1c85e0c20f04d89830a512485402af97 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 2e3fafbb14300212d056d1ad2163bb38453be069 (diff) |
ASoC: soc-dapm.c: merge dapm_power_one_widget() and dapm_widget_set_power()
dapm_widget_set_power() (= X) is called only from
dapm_power_one_widget() (= Y), and total purpose of these functions are
calling dapm_seq_insert() (= a) accordingly for each widget.
(X) static void dapm_widget_set_power(...)
{
...
if (power)
(a) dapm_seq_insert(w, up_list, true);
else
(a) dapm_seq_insert(w, down_list, false);
}
(Y) static void dapm_power_one_widget(...)
{
..
switch (w->id) {
case snd_soc_dapm_pre:
(a) dapm_seq_insert(w, down_list, false);
break;
case snd_soc_dapm_post:
(a) dapm_seq_insert(w, up_list, true);
break;
default:
power = dapm_widget_power_check(w);
(X) dapm_widget_set_power(w, power, up_list, down_list);
break;
}
}
It should be more simple, but the code is unnecessarily complicated,
and difficult to read/understand. This patch merge these into one.
Link: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Kuninori Morimoto <[email protected]>
Reviewed-by: Amadeusz Sławiński <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions