Commit 313fab48 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Mark Brown

ASoC: tegra: Constify static snd_soc_dai_ops structs

The only usage of these is to assign their address to the ops field in
the snd_soc_dai_driver struct, which is a pointer to const. Make them
const to allow the compiler to put them in read-only memory.
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: default avatarSameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/20210922205438.34519-1-rikard.falkeborn@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent edd6dffd
...@@ -206,12 +206,12 @@ static int tegra210_adx_put_byte_map(struct snd_kcontrol *kcontrol, ...@@ -206,12 +206,12 @@ static int tegra210_adx_put_byte_map(struct snd_kcontrol *kcontrol,
return 1; return 1;
} }
static struct snd_soc_dai_ops tegra210_adx_in_dai_ops = { static const struct snd_soc_dai_ops tegra210_adx_in_dai_ops = {
.hw_params = tegra210_adx_in_hw_params, .hw_params = tegra210_adx_in_hw_params,
.startup = tegra210_adx_startup, .startup = tegra210_adx_startup,
}; };
static struct snd_soc_dai_ops tegra210_adx_out_dai_ops = { static const struct snd_soc_dai_ops tegra210_adx_out_dai_ops = {
.hw_params = tegra210_adx_out_hw_params, .hw_params = tegra210_adx_out_hw_params,
}; };
......
...@@ -241,12 +241,12 @@ static int tegra210_amx_put_byte_map(struct snd_kcontrol *kcontrol, ...@@ -241,12 +241,12 @@ static int tegra210_amx_put_byte_map(struct snd_kcontrol *kcontrol,
return 1; return 1;
} }
static struct snd_soc_dai_ops tegra210_amx_out_dai_ops = { static const struct snd_soc_dai_ops tegra210_amx_out_dai_ops = {
.hw_params = tegra210_amx_out_hw_params, .hw_params = tegra210_amx_out_hw_params,
.startup = tegra210_amx_startup, .startup = tegra210_amx_startup,
}; };
static struct snd_soc_dai_ops tegra210_amx_in_dai_ops = { static const struct snd_soc_dai_ops tegra210_amx_in_dai_ops = {
.hw_params = tegra210_amx_in_hw_params, .hw_params = tegra210_amx_in_hw_params,
}; };
......
...@@ -283,11 +283,11 @@ static int tegra210_mixer_out_hw_params(struct snd_pcm_substream *substream, ...@@ -283,11 +283,11 @@ static int tegra210_mixer_out_hw_params(struct snd_pcm_substream *substream,
dai->id - TEGRA210_MIXER_RX_MAX); dai->id - TEGRA210_MIXER_RX_MAX);
} }
static struct snd_soc_dai_ops tegra210_mixer_out_dai_ops = { static const struct snd_soc_dai_ops tegra210_mixer_out_dai_ops = {
.hw_params = tegra210_mixer_out_hw_params, .hw_params = tegra210_mixer_out_hw_params,
}; };
static struct snd_soc_dai_ops tegra210_mixer_in_dai_ops = { static const struct snd_soc_dai_ops tegra210_mixer_in_dai_ops = {
.hw_params = tegra210_mixer_in_hw_params, .hw_params = tegra210_mixer_in_hw_params,
}; };
......
...@@ -387,7 +387,7 @@ static int tegra210_mvc_hw_params(struct snd_pcm_substream *substream, ...@@ -387,7 +387,7 @@ static int tegra210_mvc_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static struct snd_soc_dai_ops tegra210_mvc_dai_ops = { static const struct snd_soc_dai_ops tegra210_mvc_dai_ops = {
.hw_params = tegra210_mvc_hw_params, .hw_params = tegra210_mvc_hw_params,
}; };
......
...@@ -3287,12 +3287,12 @@ static int tegra210_sfc_put_control(struct snd_kcontrol *kcontrol, ...@@ -3287,12 +3287,12 @@ static int tegra210_sfc_put_control(struct snd_kcontrol *kcontrol,
return 1; return 1;
} }
static struct snd_soc_dai_ops tegra210_sfc_in_dai_ops = { static const struct snd_soc_dai_ops tegra210_sfc_in_dai_ops = {
.hw_params = tegra210_sfc_in_hw_params, .hw_params = tegra210_sfc_in_hw_params,
.startup = tegra210_sfc_startup, .startup = tegra210_sfc_startup,
}; };
static struct snd_soc_dai_ops tegra210_sfc_out_dai_ops = { static const struct snd_soc_dai_ops tegra210_sfc_out_dai_ops = {
.hw_params = tegra210_sfc_out_hw_params, .hw_params = tegra210_sfc_out_hw_params,
}; };
......
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