Commit 815b55e1 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Mark Brown

ASoC: fsl: Constify static snd_soc_ops

These are only assigned to the ops field in the snd_soc_dai_link struct
which is a pointer to const struct snd_soc_ops. Make them const to allow
the compiler to put them in read-only memory.
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210920193947.10237-1-rikard.falkeborn@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8e8f2ac0
...@@ -132,12 +132,12 @@ static int imx_audmix_be_hw_params(struct snd_pcm_substream *substream, ...@@ -132,12 +132,12 @@ static int imx_audmix_be_hw_params(struct snd_pcm_substream *substream,
return ret; return ret;
} }
static struct snd_soc_ops imx_audmix_fe_ops = { static const struct snd_soc_ops imx_audmix_fe_ops = {
.startup = imx_audmix_fe_startup, .startup = imx_audmix_fe_startup,
.hw_params = imx_audmix_fe_hw_params, .hw_params = imx_audmix_fe_hw_params,
}; };
static struct snd_soc_ops imx_audmix_be_ops = { static const struct snd_soc_ops imx_audmix_be_ops = {
.hw_params = imx_audmix_be_hw_params, .hw_params = imx_audmix_be_hw_params,
}; };
......
...@@ -442,12 +442,12 @@ static int imx_aif_startup(struct snd_pcm_substream *substream) ...@@ -442,12 +442,12 @@ static int imx_aif_startup(struct snd_pcm_substream *substream)
return ret; return ret;
} }
static struct snd_soc_ops imx_aif_ops = { static const struct snd_soc_ops imx_aif_ops = {
.hw_params = imx_aif_hw_params, .hw_params = imx_aif_hw_params,
.startup = imx_aif_startup, .startup = imx_aif_startup,
}; };
static struct snd_soc_ops imx_aif_ops_be = { static const struct snd_soc_ops imx_aif_ops_be = {
.hw_params = imx_aif_hw_params, .hw_params = imx_aif_hw_params,
}; };
......
...@@ -59,7 +59,7 @@ static int imx_hdmi_hw_params(struct snd_pcm_substream *substream, ...@@ -59,7 +59,7 @@ static int imx_hdmi_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static struct snd_soc_ops imx_hdmi_ops = { static const struct snd_soc_ops imx_hdmi_ops = {
.hw_params = imx_hdmi_hw_params, .hw_params = imx_hdmi_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