diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2022-03-30 23:42:27 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-04-05 12:23:14 +0300 |
commit | 5449fd7bd01fc13266979a6ab48493d4d2e43725 (patch) | |
tree | 77c2a9c5dccdbc1533304b4df2d91c696ef0e2e4 /sound/soc/samsung/littlemill.c | |
parent | 5e9058ea2bc6e73aeb54b585af38d043490a8509 (diff) | |
download | linux-5449fd7bd01fc13266979a6ab48493d4d2e43725.tar.xz |
ASoC: samsung: Constify snd_soc_dapm_{route,widget} structs
These structs only have their address assigned to the
dapm_{routes,widget} fields in the snd_soc_card struct,
both which are pointers to const data. Make them const to
allow the compiler to put them in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220330204227.25081-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/samsung/littlemill.c')
-rw-r--r-- | sound/soc/samsung/littlemill.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/samsung/littlemill.c b/sound/soc/samsung/littlemill.c index 34067cc314ff..26c42892c059 100644 --- a/sound/soc/samsung/littlemill.c +++ b/sound/soc/samsung/littlemill.c @@ -228,7 +228,7 @@ static const struct snd_kcontrol_new controls[] = { SOC_DAPM_PIN_SWITCH("WM1250 Output"), }; -static struct snd_soc_dapm_widget widgets[] = { +static const struct snd_soc_dapm_widget widgets[] = { SND_SOC_DAPM_HP("Headphone", NULL), SND_SOC_DAPM_MIC("AMIC", NULL), @@ -239,7 +239,7 @@ static struct snd_soc_dapm_widget widgets[] = { SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), }; -static struct snd_soc_dapm_route audio_paths[] = { +static const struct snd_soc_dapm_route audio_paths[] = { { "Headphone", NULL, "HPOUT1L" }, { "Headphone", NULL, "HPOUT1R" }, |