Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge series "ASoC: Constify snd_compress_ops" from Rikard Falkeborn <rikard.falkeborn@gmail.com>:

The only use of the static and global snd_compress_ops structs is to
assign their address to the compress_ops field in the
snd_soc_component_driver struct which is a pointer to const. Make them
const to allow the compiler to put them in read-only memory.

Rikard Falkeborn (5):
ASoC: cs47125: Constify static struct snd_compress_ops
ASoC: wm5102: Constify static struct snd_compress_ops
ASoC: wm5110: Constify static struct snd_compress_ops
ASoC: qcom: q6asm-dai: Constify static struct snd_compress_ops
ASoC: SOF: Intel: Constify sof_probe_compressed_ops

sound/soc/codecs/cs47l24.c | 2 +-
sound/soc/codecs/wm5102.c | 2 +-
sound/soc/codecs/wm5110.c | 2 +-
sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +-
sound/soc/sof/compress.c | 2 +-
sound/soc/sof/compress.h | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)

--
2.31.1

+6 -6
+1 -1
sound/soc/codecs/cs47l24.c
··· 1178 1178 ARIZONA_DAC_DIGITAL_VOLUME_4L, 1179 1179 }; 1180 1180 1181 - static struct snd_compress_ops cs47l24_compress_ops = { 1181 + static const struct snd_compress_ops cs47l24_compress_ops = { 1182 1182 .open = cs47l24_open, 1183 1183 .free = wm_adsp_compr_free, 1184 1184 .set_params = wm_adsp_compr_set_params,
+1 -1
sound/soc/codecs/wm5102.c
··· 1989 1989 ARIZONA_DAC_DIGITAL_VOLUME_5R, 1990 1990 }; 1991 1991 1992 - static struct snd_compress_ops wm5102_compress_ops = { 1992 + static const struct snd_compress_ops wm5102_compress_ops = { 1993 1993 .open = wm5102_open, 1994 1994 .free = wm_adsp_compr_free, 1995 1995 .set_params = wm_adsp_compr_set_params,
+1 -1
sound/soc/codecs/wm5110.c
··· 2355 2355 ARIZONA_DAC_DIGITAL_VOLUME_6R, 2356 2356 }; 2357 2357 2358 - static struct snd_compress_ops wm5110_compress_ops = { 2358 + static const struct snd_compress_ops wm5110_compress_ops = { 2359 2359 .open = wm5110_open, 2360 2360 .free = wm_adsp_compr_free, 2361 2361 .set_params = wm_adsp_compr_set_params,
+1 -1
sound/soc/qcom/qdsp6/q6asm-dai.c
··· 1169 1169 return 0; 1170 1170 } 1171 1171 1172 - static struct snd_compress_ops q6asm_dai_compress_ops = { 1172 + static const struct snd_compress_ops q6asm_dai_compress_ops = { 1173 1173 .open = q6asm_dai_compr_open, 1174 1174 .free = q6asm_dai_compr_free, 1175 1175 .set_params = q6asm_dai_compr_set_params,
+1 -1
sound/soc/sof/compress.c
··· 13 13 #include "ops.h" 14 14 #include "probe.h" 15 15 16 - struct snd_compress_ops sof_probe_compressed_ops = { 16 + const struct snd_compress_ops sof_probe_compressed_ops = { 17 17 .copy = sof_probe_compr_copy, 18 18 }; 19 19 EXPORT_SYMBOL(sof_probe_compressed_ops);
+1 -1
sound/soc/sof/compress.h
··· 13 13 14 14 #include <sound/compress_driver.h> 15 15 16 - extern struct snd_compress_ops sof_probe_compressed_ops; 16 + extern const struct snd_compress_ops sof_probe_compressed_ops; 17 17 18 18 int sof_probe_compr_open(struct snd_compr_stream *cstream, 19 19 struct snd_soc_dai *dai);