ASoC: mediatek: common: Constify struct mtk_sof_priv
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tue, 16 Apr 2024 07:13:54 +0000 (09:13 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 16 Apr 2024 10:59:55 +0000 (19:59 +0900)
commitf8782f776db33066a9b1cd14d319142c4175561f
tree71e48dfded5898fade52397be116a78e1e9fdc79
parentbce93a162505f0bc0499888ace2f66bd56fb94b3
ASoC: mediatek: common: Constify struct mtk_sof_priv

Apart from a dai_link_list variable, the mtk_sof_priv currently holds
data that never gets modified during runtime.

Constify the mtk_sof_priv structure and move the SOF dai_link_list as
sof_dai_link_list in struct mtk_soc_card_data, which is a structure
that already holds the card's machine specific, runtime modified data.

This allows to safely pass the mtk_sof_priv structure as platform data
for the commonized card probe mechanism.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/common/mtk-dsp-sof-common.c
sound/soc/mediatek/common/mtk-dsp-sof-common.h
sound/soc/mediatek/common/mtk-soc-card.h
sound/soc/mediatek/common/mtk-soundcard-driver.h