Unverified Commit 2080acf3 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Mark Brown
Browse files

ASoC: samsung: 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>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210728172548.234943-1-rikard.falkeborn@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 14db5499
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ static int aries_hw_free(struct snd_pcm_substream *substream)
/*
 * Main DAI operations
 */
static struct snd_soc_ops aries_ops = {
static const struct snd_soc_ops aries_ops = {
	.hw_params = aries_hw_params,
	.hw_free = aries_hw_free,
};
+2 −2
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ static int arndale_rt5631_hw_params(struct snd_pcm_substream *substream,
	return 0;
}

static struct snd_soc_ops arndale_rt5631_ops = {
static const struct snd_soc_ops arndale_rt5631_ops = {
	.hw_params = arndale_rt5631_hw_params,
};

@@ -80,7 +80,7 @@ static int arndale_wm1811_hw_params(struct snd_pcm_substream *substream,
					rclk + 1, SND_SOC_CLOCK_IN);
}

static struct snd_soc_ops arndale_wm1811_ops = {
static const struct snd_soc_ops arndale_wm1811_ops = {
	.hw_params = arndale_wm1811_hw_params,
};

+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ static int h1940_hw_params(struct snd_pcm_substream *substream,
	return 0;
}

static struct snd_soc_ops h1940_ops = {
static const struct snd_soc_ops h1940_ops = {
	.startup	= h1940_startup,
	.hw_params	= h1940_hw_params,
};
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ static int littlemill_hw_params(struct snd_pcm_substream *substream,
	return 0;
}

static struct snd_soc_ops littlemill_ops = {
static const struct snd_soc_ops littlemill_ops = {
	.hw_params = littlemill_hw_params,
};

+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ static int midas_aif1_hw_params(struct snd_pcm_substream *substream,
	return midas_start_fll1(rtd, pll_out);
}

static struct snd_soc_ops midas_aif1_ops = {
static const struct snd_soc_ops midas_aif1_ops = {
	.hw_params = midas_aif1_hw_params,
};

Loading