summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5514.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-08-01 09:40:23 +0300
committerMark Brown <broonie@kernel.org>2021-08-03 20:27:16 +0300
commit5c8a7efc2fd5eb716c48d7d7ab4295effbc09ba3 (patch)
treeb52d67582360d3602128fd2061489f819e29cf85 /sound/soc/codecs/rt5514.c
parent0d73297e483e5b7ce197c0a923424e5dd96eae4d (diff)
downloadlinux-5c8a7efc2fd5eb716c48d7d7ab4295effbc09ba3.tar.xz
ASoC: rt5514: make array div static const, makes object smaller
Don't populate the array div on the stack but instead it static const. Makes the object code smaller by 48 bytes. Before: text data bss dec hex filename 53894 16368 128 70390 112f6 ./sound/soc/codecs/rt5514.o After: text data bss dec hex filename 53750 16464 128 70342 112c6 ./sound/soc/codecs/rt5514.o (gcc version 10.2.0) Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210801064023.138359-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5514.c')
-rw-r--r--sound/soc/codecs/rt5514.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c
index 7081142a355e..4b1ad5054e8d 100644
--- a/sound/soc/codecs/rt5514.c
+++ b/sound/soc/codecs/rt5514.c
@@ -494,7 +494,7 @@ static const struct snd_kcontrol_new rt5514_sto2_dmic_mux =
*/
static int rt5514_calc_dmic_clk(struct snd_soc_component *component, int rate)
{
- int div[] = {2, 3, 4, 8, 12, 16, 24, 32};
+ static const int div[] = {2, 3, 4, 8, 12, 16, 24, 32};
int i;
if (rate < 1000000 * div[0]) {