diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-09-07 09:46:34 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-09-09 11:52:07 +0200 |
commit | 13ab0d1ab8ae4d1b3b247fd5caec2c10e35c7269 (patch) | |
tree | 4de6b92da89d282a6227d8a3a0c72eeddc565af8 /sound | |
parent | ASoC: rt1305: make array pd static const, makes object smaller (diff) | |
download | linux-13ab0d1ab8ae4d1b3b247fd5caec2c10e35c7269.tar.xz linux-13ab0d1ab8ae4d1b3b247fd5caec2c10e35c7269.zip |
ASoC: rt1308: make array pd static const, makes object smaller
Don't populate the array pd on the stack but instead make it
static const. Makes the object code smaller by 82 bytes.
Before:
text data bss dec hex filename
26548 7288 64 33900 846c sound/soc/codecs/rt1308.o
After:
text data bss dec hex filename
26370 7384 64 33818 841a sound/soc/codecs/rt1308.o
(gcc version 9.2.1, amd64)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190907074634.22144-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/rt1308.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt1308.c b/sound/soc/codecs/rt1308.c index 6f2ee6809dbb..b75931a69a1c 100644 --- a/sound/soc/codecs/rt1308.c +++ b/sound/soc/codecs/rt1308.c @@ -436,7 +436,8 @@ static const struct snd_soc_dapm_route rt1308_dapm_routes[] = { static int rt1308_get_clk_info(int sclk, int rate) { - int i, pd[] = {1, 2, 3, 4, 6, 8, 12, 16}; + int i; + static const int pd[] = {1, 2, 3, 4, 6, 8, 12, 16}; if (sclk <= 0 || rate <= 0) return -EINVAL; |