Unverified Commit 26bf457b authored by Mark Brown's avatar Mark Brown
Browse files

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
parents d86eb334 7db43da8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1178,7 +1178,7 @@ static unsigned int cs47l24_digital_vu[] = {
	ARIZONA_DAC_DIGITAL_VOLUME_4L,
};

static struct snd_compress_ops cs47l24_compress_ops = {
static const struct snd_compress_ops cs47l24_compress_ops = {
	.open		= cs47l24_open,
	.free		= wm_adsp_compr_free,
	.set_params	= wm_adsp_compr_set_params,
+1 −1
Original line number Diff line number Diff line
@@ -1989,7 +1989,7 @@ static unsigned int wm5102_digital_vu[] = {
	ARIZONA_DAC_DIGITAL_VOLUME_5R,
};

static struct snd_compress_ops wm5102_compress_ops = {
static const struct snd_compress_ops wm5102_compress_ops = {
	.open		= wm5102_open,
	.free		= wm_adsp_compr_free,
	.set_params	= wm_adsp_compr_set_params,
+1 −1
Original line number Diff line number Diff line
@@ -2355,7 +2355,7 @@ static unsigned int wm5110_digital_vu[] = {
	ARIZONA_DAC_DIGITAL_VOLUME_6R,
};

static struct snd_compress_ops wm5110_compress_ops = {
static const struct snd_compress_ops wm5110_compress_ops = {
	.open		= wm5110_open,
	.free		= wm_adsp_compr_free,
	.set_params	= wm_adsp_compr_set_params,
+1 −1
Original line number Diff line number Diff line
@@ -1169,7 +1169,7 @@ static int q6asm_dai_compr_get_codec_caps(struct snd_soc_component *component,
	return 0;
}

static struct snd_compress_ops q6asm_dai_compress_ops = {
static const struct snd_compress_ops q6asm_dai_compress_ops = {
	.open		= q6asm_dai_compr_open,
	.free		= q6asm_dai_compr_free,
	.set_params	= q6asm_dai_compr_set_params,
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
#include "ops.h"
#include "probe.h"

struct snd_compress_ops sof_probe_compressed_ops = {
const struct snd_compress_ops sof_probe_compressed_ops = {
	.copy		= sof_probe_compr_copy,
};
EXPORT_SYMBOL(sof_probe_compressed_ops);
Loading