Commit 5449fd7b authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Mark Brown

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: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220330204227.25081-1-rikard.falkeborn@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5e9058ea
...@@ -386,11 +386,11 @@ static struct snd_soc_codec_conf bells_codec_conf[] = { ...@@ -386,11 +386,11 @@ static struct snd_soc_codec_conf bells_codec_conf[] = {
}, },
}; };
static struct snd_soc_dapm_widget bells_widgets[] = { static const struct snd_soc_dapm_widget bells_widgets[] = {
SND_SOC_DAPM_MIC("DMIC", NULL), SND_SOC_DAPM_MIC("DMIC", NULL),
}; };
static struct snd_soc_dapm_route bells_routes[] = { static const struct snd_soc_dapm_route bells_routes[] = {
{ "Sub CLK_SYS", NULL, "OPCLK" }, { "Sub CLK_SYS", NULL, "OPCLK" },
{ "CLKIN", NULL, "OPCLK" }, { "CLKIN", NULL, "OPCLK" },
......
...@@ -228,7 +228,7 @@ static const struct snd_kcontrol_new controls[] = { ...@@ -228,7 +228,7 @@ static const struct snd_kcontrol_new controls[] = {
SOC_DAPM_PIN_SWITCH("WM1250 Output"), 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_HP("Headphone", NULL),
SND_SOC_DAPM_MIC("AMIC", NULL), SND_SOC_DAPM_MIC("AMIC", NULL),
...@@ -239,7 +239,7 @@ static struct snd_soc_dapm_widget widgets[] = { ...@@ -239,7 +239,7 @@ static struct snd_soc_dapm_widget widgets[] = {
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), 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, "HPOUT1L" },
{ "Headphone", NULL, "HPOUT1R" }, { "Headphone", NULL, "HPOUT1R" },
......
...@@ -140,7 +140,7 @@ static const struct snd_kcontrol_new controls[] = { ...@@ -140,7 +140,7 @@ static const struct snd_kcontrol_new controls[] = {
SOC_DAPM_PIN_SWITCH("Headphone"), SOC_DAPM_PIN_SWITCH("Headphone"),
}; };
static struct snd_soc_dapm_widget widgets[] = { static const struct snd_soc_dapm_widget widgets[] = {
SND_SOC_DAPM_HP("Headphone", NULL), SND_SOC_DAPM_HP("Headphone", NULL),
SND_SOC_DAPM_MIC("Headset Mic", NULL), SND_SOC_DAPM_MIC("Headset Mic", NULL),
...@@ -150,7 +150,7 @@ static struct snd_soc_dapm_widget widgets[] = { ...@@ -150,7 +150,7 @@ static struct snd_soc_dapm_widget widgets[] = {
SND_SOC_DAPM_MIC("Main DMIC", NULL), SND_SOC_DAPM_MIC("Main DMIC", NULL),
}; };
static struct snd_soc_dapm_route audio_paths[] = { static const struct snd_soc_dapm_route audio_paths[] = {
{ "Sub IN1", NULL, "HPOUT2L" }, { "Sub IN1", NULL, "HPOUT2L" },
{ "Sub IN2", NULL, "HPOUT2R" }, { "Sub IN2", NULL, "HPOUT2R" },
......
...@@ -261,7 +261,7 @@ static const struct snd_kcontrol_new controls[] = { ...@@ -261,7 +261,7 @@ static const struct snd_kcontrol_new controls[] = {
SOC_DAPM_PIN_SWITCH("Headphone"), SOC_DAPM_PIN_SWITCH("Headphone"),
}; };
static struct snd_soc_dapm_widget widgets[] = { static const struct snd_soc_dapm_widget widgets[] = {
SND_SOC_DAPM_HP("Headphone", NULL), SND_SOC_DAPM_HP("Headphone", NULL),
SND_SOC_DAPM_MIC("Headset Mic", NULL), SND_SOC_DAPM_MIC("Headset Mic", NULL),
...@@ -271,7 +271,7 @@ static struct snd_soc_dapm_widget widgets[] = { ...@@ -271,7 +271,7 @@ static struct snd_soc_dapm_widget widgets[] = {
SND_SOC_DAPM_MIC("Main DMIC", NULL), SND_SOC_DAPM_MIC("Main DMIC", NULL),
}; };
static struct snd_soc_dapm_route audio_paths[] = { static const struct snd_soc_dapm_route audio_paths[] = {
{ "IN1RN", NULL, "MICB1" }, { "IN1RN", NULL, "MICB1" },
{ "IN1RP", NULL, "MICB1" }, { "IN1RP", NULL, "MICB1" },
{ "IN1RN", NULL, "MICB2" }, { "IN1RN", NULL, "MICB2" },
......
...@@ -130,7 +130,7 @@ static const struct snd_kcontrol_new controls[] = { ...@@ -130,7 +130,7 @@ static const struct snd_kcontrol_new controls[] = {
SOC_DAPM_PIN_SWITCH("DMIC"), SOC_DAPM_PIN_SWITCH("DMIC"),
}; };
static struct snd_soc_dapm_widget widgets[] = { static const struct snd_soc_dapm_widget widgets[] = {
SND_SOC_DAPM_HP("Headphone", NULL), SND_SOC_DAPM_HP("Headphone", NULL),
SND_SOC_DAPM_MIC("Headset Mic", NULL), SND_SOC_DAPM_MIC("Headset Mic", NULL),
...@@ -140,7 +140,7 @@ static struct snd_soc_dapm_widget widgets[] = { ...@@ -140,7 +140,7 @@ static struct snd_soc_dapm_widget widgets[] = {
SND_SOC_DAPM_SPK("Main Speaker", NULL), SND_SOC_DAPM_SPK("Main Speaker", NULL),
}; };
static struct snd_soc_dapm_route audio_paths[] = { static const struct snd_soc_dapm_route audio_paths[] = {
{ "Headphone", NULL, "HPOUTL" }, { "Headphone", NULL, "HPOUTL" },
{ "Headphone", NULL, "HPOUTR" }, { "Headphone", NULL, "HPOUTR" },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment