ASoC: mediatek: mt8195-afe-pcm: Clean up unnecessary functions
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Wed, 3 May 2023 11:34:13 +0000 (13:34 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 7 May 2023 23:48:23 +0000 (08:48 +0900)
commit686d041685639493a608bdcdb0d00551796721c9
tree992d309309a65642e9f5195418be33c731b952f7
parent709f34b41ceffedec17d1150018cf62f8ea95842
ASoC: mediatek: mt8195-afe-pcm: Clean up unnecessary functions

Function mt8195_afe_init_registers() performs just a single call to
regmap_multi_reg_write(), it returns int and it's not error checked;
move that call to the probe function and also add some error check.

While at it, also move the contents of mt8195_afe_parse_of() to the
probe function as well: since this is getting a handle to topckgen
and since that's optional, the ifdef for CONFIG_SND_SOC_MT6359 can
also be removed.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com
Acked-by: Trevor Wu <trevor.wu@mediatek.com
Link: https://lore.kernel.org/r/20230503113413.149235-6-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c