[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221018152928.942186-1-colin.i.king@gmail.com>
Date: Tue, 18 Oct 2022 16:29:28 +0100
From: Colin Ian King <colin.i.king@...il.com>
To: Peter Ujfalusi <peter.ujfalusi@...il.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ASoC: twl4030: make read-only array ramp_base static const
Don't populate the read-only array ramp_base on the stack but
instead make it static const. Also makes the object code a
little smaller.
Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
sound/soc/codecs/twl4030.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index e48768233e20..9c50ac356c89 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -700,8 +700,10 @@ static void headset_ramp(struct snd_soc_component *component, int ramp)
struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component);
struct twl4030_board_params *board_params = twl4030->board_params;
/* Base values for ramp delay calculation: 2^19 - 2^26 */
- unsigned int ramp_base[] = {524288, 1048576, 2097152, 4194304,
- 8388608, 16777216, 33554432, 67108864};
+ static const unsigned int ramp_base[] = {
+ 524288, 1048576, 2097152, 4194304,
+ 8388608, 16777216, 33554432, 67108864
+ };
unsigned int delay;
hs_gain = twl4030_read(component, TWL4030_REG_HS_GAIN_SET);
--
2.37.3
Powered by blists - more mailing lists