ASoC: fsl: constify static snd_soc_dai_ops structs
Subsystems (3)
PATCH 1/1 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.
--- sound/soc/fsl/fsl_easrc.c | 2 +- sound/soc/fsl/fsl_micfil.c | 2 +- sound/soc/fsl/fsl_xcvr.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/fsl/fsl_easrc.c +1 -1
@@ -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,
sound/soc/fsl/fsl_micfil.c +1 -1
@@ -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,
sound/soc/fsl/fsl_xcvr.c +1 -1
@@ -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,
Signature · 1 line
2.30.0
Quoted 6 lines · Rikard Falkeborn
The only usage of these is to assign their address to the 'ops' field in the
snd_soc_dai_driverstruct, 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]>
Mark Brown
maintainerQuoted 3 lines · Rikard Falkeborn
The only usage of these is to assign their address to the 'ops' field in the
snd_soc_dai_driverstruct, which is a pointer to const. Make them const to allow the compiler to put them in read-only memory.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: fsl: constify static snd_soc_dai_ops structs
commit: 38d89a564847048c0f6fe53a829d15edb4f21da3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark