]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ASoC: fsl: Constify reg_default array
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Wed, 28 May 2025 19:59:56 +0000 (21:59 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 8 Jun 2025 22:30:30 +0000 (23:30 +0100)
Static 'struct reg_default' array is not modified so can be changed to
const for more safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250528-asoc-const-unused-v1-2-19a5d07b9d5c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_asrc.c
sound/soc/fsl/fsl_sai.c

index 677529916dc0e53a15952c53016930203c56dc9d..637260f306ecab109ed23b92a882cffce1c65421 100644 (file)
@@ -930,7 +930,7 @@ static bool fsl_asrc_writeable_reg(struct device *dev, unsigned int reg)
        }
 }
 
-static struct reg_default fsl_asrc_reg[] = {
+static const struct reg_default fsl_asrc_reg[] = {
        { REG_ASRCTR, 0x0000 }, { REG_ASRIER, 0x0000 },
        { REG_ASRCNCR, 0x0000 }, { REG_ASRCFG, 0x0000 },
        { REG_ASRCSR, 0x0000 }, { REG_ASRCDR1, 0x0000 },
index af1a168d35e379e24ce46715ba53b4a4dac65988..c84e3bb1290fd1188118b220adeb4f8e279a3372 100644 (file)
@@ -1059,7 +1059,7 @@ static const struct snd_soc_component_driver fsl_component = {
        .legacy_dai_naming      = 1,
 };
 
-static struct reg_default fsl_sai_reg_defaults_ofs0[] = {
+static const struct reg_default fsl_sai_reg_defaults_ofs0[] = {
        {FSL_SAI_TCR1(0), 0},
        {FSL_SAI_TCR2(0), 0},
        {FSL_SAI_TCR3(0), 0},
@@ -1082,7 +1082,7 @@ static struct reg_default fsl_sai_reg_defaults_ofs0[] = {
        {FSL_SAI_RMR, 0},
 };
 
-static struct reg_default fsl_sai_reg_defaults_ofs8[] = {
+static const struct reg_default fsl_sai_reg_defaults_ofs8[] = {
        {FSL_SAI_TCR1(8), 0},
        {FSL_SAI_TCR2(8), 0},
        {FSL_SAI_TCR3(8), 0},