From: Colin Ian King Date: Fri, 2 Dec 2022 17:06:44 +0000 (+0000) Subject: ASoC: wcd938x: Make read-only array minCode_param static const X-Git-Tag: v6.6.7~3823^2^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e110ede8c31da90caae375deeac12e553a0aeaf5;p=platform%2Fkernel%2Flinux-starfive.git ASoC: wcd938x: Make read-only array minCode_param static const Don't populate the read-only array minCode_param on the stack but instead make it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221202170644.1814720-1-colin.i.king@gmail.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index aca06a4..fcac763 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -3128,8 +3128,8 @@ static inline void wcd938x_mbhc_get_result_params(struct wcd938x_priv *wcd938x, s16 c1; s32 x1, d1; int32_t denom; - int minCode_param[] = { - 3277, 1639, 820, 410, 205, 103, 52, 26 + static const int minCode_param[] = { + 3277, 1639, 820, 410, 205, 103, 52, 26 }; regmap_update_bits(wcd938x->regmap, WCD938X_ANA_MBHC_ZDET, 0x20, 0x20);