aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-09-15 11:50:27 +0100
committerMark Brown <broonie@kernel.org>2021-09-15 13:12:27 +0100
commitce3f9357638720f4a78f6a6e481941c37f33bceb (patch)
tree410bb0d09b2bc076a0e3944e17be37b1e7ff0f48
parentASoC: mediatek: mt8195: Add missing of_node_put() (diff)
downloadlinux-dev-ce3f9357638720f4a78f6a6e481941c37f33bceb.tar.xz
linux-dev-ce3f9357638720f4a78f6a6e481941c37f33bceb.zip
ASoC: mediatek: mt8195: make array adda_dai_list static const
Don't populate the array adda_dai_list on the stack but instead it static const. Also makes the object code smaller by 33 bytes: Before: text data bss dec hex filename 28271 11640 0 39911 9be7 mt8195/mt8195-dai-adda.o After: text data bss dec hex filename 28142 11736 0 39878 9bc6 mt8195/mt8195-dai-adda.o (gcc version 11.2.0) Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210915105027.10805-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/mediatek/mt8195/mt8195-dai-adda.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/mediatek/mt8195/mt8195-dai-adda.c b/sound/soc/mediatek/mt8195/mt8195-dai-adda.c
index 878dec0b69ed..f04bd1781356 100644
--- a/sound/soc/mediatek/mt8195/mt8195-dai-adda.c
+++ b/sound/soc/mediatek/mt8195/mt8195-dai-adda.c
@@ -788,9 +788,11 @@ static int init_adda_priv_data(struct mtk_base_afe *afe)
{
struct mt8195_afe_private *afe_priv = afe->platform_priv;
struct mtk_dai_adda_priv *adda_priv;
- int adda_dai_list[] = { MT8195_AFE_IO_DL_SRC,
- MT8195_AFE_IO_UL_SRC1,
- MT8195_AFE_IO_UL_SRC2};
+ static const int adda_dai_list[] = {
+ MT8195_AFE_IO_DL_SRC,
+ MT8195_AFE_IO_UL_SRC1,
+ MT8195_AFE_IO_UL_SRC2
+ };
int i;
for (i = 0; i < ARRAY_SIZE(adda_dai_list); i++) {