Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64793047 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

ASoC: Constify snd_soc_dai_ops variables



The snd_soc_dai_ops variables are not modified after initialization in
these drivers, so make them const.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d770e558
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -919,7 +919,7 @@ static int cs42l52_set_bias_level(struct snd_soc_codec *codec,
			SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_U20_3LE | \
			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_U24_LE)

static struct snd_soc_dai_ops cs42l52_ops = {
static const struct snd_soc_dai_ops cs42l52_ops = {
	.hw_params	= cs42l52_pcm_hw_params,
	.digital_mute	= cs42l52_digital_mute,
	.set_fmt	= cs42l52_set_fmt,
+1 −1
Original line number Diff line number Diff line
@@ -989,7 +989,7 @@ static int cs42l56_set_bias_level(struct snd_soc_codec *codec,
			SNDRV_PCM_FMTBIT_S32_LE)


static struct snd_soc_dai_ops cs42l56_ops = {
static const struct snd_soc_dai_ops cs42l56_ops = {
	.hw_params	= cs42l56_pcm_hw_params,
	.digital_mute	= cs42l56_digital_mute,
	.set_fmt	= cs42l56_set_dai_fmt,
+4 −4
Original line number Diff line number Diff line
@@ -1016,25 +1016,25 @@ static int isabelle_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
#define ISABELLE_FORMATS (SNDRV_PCM_FMTBIT_S20_3LE |\
			SNDRV_PCM_FMTBIT_S32_LE)

static struct snd_soc_dai_ops isabelle_hs_dai_ops = {
static const struct snd_soc_dai_ops isabelle_hs_dai_ops = {
	.hw_params	= isabelle_hw_params,
	.set_fmt	= isabelle_set_dai_fmt,
	.digital_mute	= isabelle_hs_mute,
};

static struct snd_soc_dai_ops isabelle_hf_dai_ops = {
static const struct snd_soc_dai_ops isabelle_hf_dai_ops = {
	.hw_params	= isabelle_hw_params,
	.set_fmt	= isabelle_set_dai_fmt,
	.digital_mute	= isabelle_hf_mute,
};

static struct snd_soc_dai_ops isabelle_line_dai_ops = {
static const struct snd_soc_dai_ops isabelle_line_dai_ops = {
	.hw_params	= isabelle_hw_params,
	.set_fmt	= isabelle_set_dai_fmt,
	.digital_mute	= isabelle_line_mute,
};

static struct snd_soc_dai_ops isabelle_ul_dai_ops = {
static const struct snd_soc_dai_ops isabelle_ul_dai_ops = {
	.hw_params	= isabelle_hw_params,
	.set_fmt	= isabelle_set_dai_fmt,
};
+5 −5
Original line number Diff line number Diff line
@@ -1291,35 +1291,35 @@ static int lm49453_set_bias_level(struct snd_soc_codec *codec,
#define LM49453_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
			 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)

static struct snd_soc_dai_ops lm49453_headset_dai_ops = {
static const struct snd_soc_dai_ops lm49453_headset_dai_ops = {
	.hw_params	= lm49453_hw_params,
	.set_sysclk	= lm49453_set_dai_sysclk,
	.set_fmt	= lm49453_set_dai_fmt,
	.digital_mute	= lm49453_hp_mute,
};

static struct snd_soc_dai_ops lm49453_speaker_dai_ops = {
static const struct snd_soc_dai_ops lm49453_speaker_dai_ops = {
	.hw_params	= lm49453_hw_params,
	.set_sysclk	= lm49453_set_dai_sysclk,
	.set_fmt	= lm49453_set_dai_fmt,
	.digital_mute	= lm49453_ls_mute,
};

static struct snd_soc_dai_ops lm49453_haptic_dai_ops = {
static const struct snd_soc_dai_ops lm49453_haptic_dai_ops = {
	.hw_params	= lm49453_hw_params,
	.set_sysclk	= lm49453_set_dai_sysclk,
	.set_fmt	= lm49453_set_dai_fmt,
	.digital_mute	= lm49453_ha_mute,
};

static struct snd_soc_dai_ops lm49453_ep_dai_ops = {
static const struct snd_soc_dai_ops lm49453_ep_dai_ops = {
	.hw_params	= lm49453_hw_params,
	.set_sysclk	= lm49453_set_dai_sysclk,
	.set_fmt	= lm49453_set_dai_fmt,
	.digital_mute	= lm49453_ep_mute,
};

static struct snd_soc_dai_ops lm49453_lineout_dai_ops = {
static const struct snd_soc_dai_ops lm49453_lineout_dai_ops = {
	.hw_params	= lm49453_hw_params,
	.set_sysclk	= lm49453_set_dai_sysclk,
	.set_fmt	= lm49453_set_dai_fmt,
+1 −1
Original line number Diff line number Diff line
@@ -2383,7 +2383,7 @@ EXPORT_SYMBOL_GPL(max98090_mic_detect);
#define MAX98090_RATES SNDRV_PCM_RATE_8000_96000
#define MAX98090_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)

static struct snd_soc_dai_ops max98090_dai_ops = {
static const struct snd_soc_dai_ops max98090_dai_ops = {
	.set_sysclk = max98090_dai_set_sysclk,
	.set_fmt = max98090_dai_set_fmt,
	.set_tdm_slot = max98090_set_tdm_slot,
Loading