mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
ASoC: fsl: 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: Rikard Falkeborn <[email protected]> Acked-by: Shengjiu Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
1 parent
f08c74a3b5
commit
38d89a5648
3 files changed
+3
-3
No files matched your search
@@ -1530,7 +1530,7 @@ static int fsl_easrc_hw_free(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops fsl_easrc_dai_ops = {
|
||||
static const struct snd_soc_dai_ops fsl_easrc_dai_ops = {
|
||||
.startup = fsl_easrc_startup,
|
||||
.trigger = fsl_easrc_trigger,
|
||||
.hw_params = fsl_easrc_hw_params,
|
||||
|
||||
@@ -381,7 +381,7 @@ static int fsl_micfil_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops fsl_micfil_dai_ops = {
|
||||
static const struct snd_soc_dai_ops fsl_micfil_dai_ops = {
|
||||
.startup = fsl_micfil_startup,
|
||||
.trigger = fsl_micfil_trigger,
|
||||
.hw_params = fsl_micfil_hw_params,
|
||||
|
||||
@@ -857,7 +857,7 @@ static struct snd_kcontrol_new fsl_xcvr_tx_ctls[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_ops fsl_xcvr_dai_ops = {
|
||||
static const struct snd_soc_dai_ops fsl_xcvr_dai_ops = {
|
||||
.prepare = fsl_xcvr_prepare,
|
||||
.startup = fsl_xcvr_startup,
|
||||
.shutdown = fsl_xcvr_shutdown,
|
||||
|
||||
Reference in new issue
Block a user