[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220214213223.65780-1-colin.i.king@gmail.com>
Date: Mon, 14 Feb 2022 21:32:23 +0000
From: Colin Ian King <colin.i.king@...il.com>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Dmitry Osipenko <digetx@...il.com>,
alsa-devel@...a-project.org, linux-tegra@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ASoC: tegra20: spdif: make const array rates static
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@...il.com>
---
sound/soc/tegra/tegra20_spdif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c
index d09cd7ee6879..64c2f304f254 100644
--- 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);
--
2.34.1
Powered by blists - more mailing lists