diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-09-07 10:41:56 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-09-09 12:51:52 +0300 |
commit | b61b1e35ed06db180968cb5ca0fbf8b8887ccb93 (patch) | |
tree | 6a99eef9ed69105669ec57246c7d0fc47014bc27 /sound | |
parent | 2b70d5776e8b173e3b36a2ef63d94428c6a80e1f (diff) | |
download | linux-b61b1e35ed06db180968cb5ca0fbf8b8887ccb93.tar.xz |
ASoC: rt1305: 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 93 bytes.
Before:
text data bss dec hex filename
38961 9784 64 48809 bea9 sound/soc/codecs/rt1305.o
After:
text data bss dec hex filename
38804 9848 64 48716 be4c sound/soc/codecs/rt1305.o
(gcc version 9.2.1, amd64)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190907074156.21907-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/rt1305.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt1305.c b/sound/soc/codecs/rt1305.c index 9909369483f0..e27742abfa76 100644 --- a/sound/soc/codecs/rt1305.c +++ b/sound/soc/codecs/rt1305.c @@ -608,7 +608,8 @@ static const struct snd_soc_dapm_route rt1305_dapm_routes[] = { static int rt1305_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; |