Thread (20 messages) flat view 20 messages, 5 authors, 2025-06-09

Re: [PATCH 1/8] ASoC: codecs: Constify regmap configuration static variables

From: Charles Keepax <ckeepax@opensource.cirrus.com>
Date: 2025-05-29 10:10:37
Also in: linux-arm-msm, linux-sound, lkml

On Wed, May 28, 2025 at 09:59:55PM +0200, Krzysztof Kozlowski wrote:
quoted hunk ↗ jump to hunk
Static arrays/structs for regmap configuration like 'struct
reg_default', 'struct reg_sequence' and others are not modified so can
be changed to const for more safety.

Signed-off-by: Krzysztof Kozlowski <redacted>
---
 sound/soc/codecs/cs35l36.c        | 2 +-
diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
index b49c6905e8727d7c07fd10e668507ca07bf2cff5..b60697ff7a506dccf3dba1b01faa985761bbbc42 100644
--- a/sound/soc/codecs/cs35l36.c
+++ b/sound/soc/codecs/cs35l36.c
-static struct reg_default cs35l36_reg[] = {
+static const struct reg_default cs35l36_reg[] = {
 	{CS35L36_TESTKEY_CTRL,			0x00000000},
 	{CS35L36_USERKEY_CTL,			0x00000000},
 	{CS35L36_OTP_CTRL1,			0x00002460},
For the cs35l56:

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help