diff options
author | Hans de Goede <hdegoede@redhat.com> | 2024-02-10 14:44:00 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-02-11 16:57:24 +0000 |
commit | 930375d34de67e129566caca008de0bbc54a4646 (patch) | |
tree | e9c854d359432585b987b817ecc2132073ab4e7f /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | 7d99a70b65951108d82e1618c67abe69c3ed7720 (diff) |
ASoC: Intel: cht_bsw_rt5645: Cleanup codec_name handling
4 fixes / cleanups to the rt5645 mc driver's codec_name handling:
1. In the for loop looking for the dai_index for the codec, replace
card->dai_link[i] with cht_dailink[i]. The for loop already uses
ARRAY_SIZE(cht_dailink) as bound and card->dai_link is just a pointer to
cht_dailink using card->dai_link only obfuscates that cht_dailink is being
modified directly rather then say a copy of cht_dailink. Using
cht_dailink[i] also makes the code consistent with other machine drivers.
2. Don't set cht_dailink[dai_index].codecs->name in the for loop,
this immediately gets overridden using acpi_dev_name(adev) directly
below the loop.
3. Add a missing break to the loop.
4. Remove the now no longer used (only set, never read) codec_name field
from struct cht_mc_private.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240210134400.24913-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions