projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4965e38
)
ASoC: tegra20: spdif: make const array rates static
author
Colin Ian King
<colin.i.king@gmail.com>
Mon, 14 Feb 2022 21:32:23 +0000
(21:32 +0000)
committer
Mark Brown
<broonie@kernel.org>
Tue, 15 Feb 2022 12:52:44 +0000
(12:52 +0000)
Don't populate the read-only const array rates on the stack but
instead it static. Also makes the object code a little smaller.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link:
https://lore.kernel.org/r/20220214213223.65780-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/tegra/tegra20_spdif.c
patch
|
blob
|
history
diff --git
a/sound/soc/tegra/tegra20_spdif.c
b/sound/soc/tegra/tegra20_spdif.c
index
d09cd7e
..
64c2f30
100644
(file)
--- a/
sound/soc/tegra/tegra20_spdif.c
+++ b/
sound/soc/tegra/tegra20_spdif.c
@@
-186,7
+186,7
@@
static int tegra20_spdif_filter_rates(struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai = rule->private;
struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev);
struct clk *parent = clk_get_parent(spdif->clk_spdif_out);
- const unsigned int rates[] = { 32000, 44100, 48000 };
+
static
const unsigned int rates[] = { 32000, 44100, 48000 };
long i, parent_rate, valid_rates = 0;
parent_rate = clk_get_rate(parent);