mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 16:56:53 +07:00
ASoC: intel: skl: Constify hw_constraints
snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
1ebb4d9dbf
commit
617647ae28
@ -266,21 +266,21 @@ static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime *rtd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int rates[] = {
|
||||
static const unsigned int rates[] = {
|
||||
48000,
|
||||
};
|
||||
|
||||
static struct snd_pcm_hw_constraint_list constraints_rates = {
|
||||
static const struct snd_pcm_hw_constraint_list constraints_rates = {
|
||||
.count = ARRAY_SIZE(rates),
|
||||
.list = rates,
|
||||
.mask = 0,
|
||||
};
|
||||
|
||||
static unsigned int channels[] = {
|
||||
static const unsigned int channels[] = {
|
||||
2,
|
||||
};
|
||||
|
||||
static struct snd_pcm_hw_constraint_list constraints_channels = {
|
||||
static const struct snd_pcm_hw_constraint_list constraints_channels = {
|
||||
.count = ARRAY_SIZE(channels),
|
||||
.list = channels,
|
||||
.mask = 0,
|
||||
@ -348,11 +348,11 @@ static int skylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int channels_dmic[] = {
|
||||
static const unsigned int channels_dmic[] = {
|
||||
2, 4,
|
||||
};
|
||||
|
||||
static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
|
||||
static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
|
||||
.count = ARRAY_SIZE(channels_dmic),
|
||||
.list = channels_dmic,
|
||||
.mask = 0,
|
||||
@ -384,11 +384,11 @@ static const struct snd_soc_ops skylake_dmic_ops = {
|
||||
.startup = skylake_dmic_startup,
|
||||
};
|
||||
|
||||
static unsigned int rates_16000[] = {
|
||||
static const unsigned int rates_16000[] = {
|
||||
16000,
|
||||
};
|
||||
|
||||
static struct snd_pcm_hw_constraint_list constraints_16000 = {
|
||||
static const struct snd_pcm_hw_constraint_list constraints_16000 = {
|
||||
.count = ARRAY_SIZE(rates_16000),
|
||||
.list = rates_16000,
|
||||
};
|
||||
|
@ -297,21 +297,21 @@ static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime *rtd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int rates[] = {
|
||||
static const unsigned int rates[] = {
|
||||
48000,
|
||||
};
|
||||
|
||||
static struct snd_pcm_hw_constraint_list constraints_rates = {
|
||||
static const struct snd_pcm_hw_constraint_list constraints_rates = {
|
||||
.count = ARRAY_SIZE(rates),
|
||||
.list = rates,
|
||||
.mask = 0,
|
||||
};
|
||||
|
||||
static unsigned int channels[] = {
|
||||
static const unsigned int channels[] = {
|
||||
2,
|
||||
};
|
||||
|
||||
static struct snd_pcm_hw_constraint_list constraints_channels = {
|
||||
static const struct snd_pcm_hw_constraint_list constraints_channels = {
|
||||
.count = ARRAY_SIZE(channels),
|
||||
.list = channels,
|
||||
.mask = 0,
|
||||
@ -397,11 +397,11 @@ static const struct snd_soc_ops skylake_nau8825_ops = {
|
||||
.hw_params = skylake_nau8825_hw_params,
|
||||
};
|
||||
|
||||
static unsigned int channels_dmic[] = {
|
||||
static const unsigned int channels_dmic[] = {
|
||||
2, 4,
|
||||
};
|
||||
|
||||
static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
|
||||
static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
|
||||
.count = ARRAY_SIZE(channels_dmic),
|
||||
.list = channels_dmic,
|
||||
.mask = 0,
|
||||
@ -433,11 +433,11 @@ static const struct snd_soc_ops skylake_dmic_ops = {
|
||||
.startup = skylake_dmic_startup,
|
||||
};
|
||||
|
||||
static unsigned int rates_16000[] = {
|
||||
static const unsigned int rates_16000[] = {
|
||||
16000,
|
||||
};
|
||||
|
||||
static struct snd_pcm_hw_constraint_list constraints_16000 = {
|
||||
static const struct snd_pcm_hw_constraint_list constraints_16000 = {
|
||||
.count = ARRAY_SIZE(rates_16000),
|
||||
.list = rates_16000,
|
||||
};
|
||||
|
@ -165,21 +165,21 @@ static int skylake_hdmi_init(struct snd_soc_pcm_runtime *rtd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int rates[] = {
|
||||
static const unsigned int rates[] = {
|
||||
48000,
|
||||
};
|
||||
|
||||
static struct snd_pcm_hw_constraint_list constraints_rates = {
|
||||
static const struct snd_pcm_hw_constraint_list constraints_rates = {
|
||||
.count = ARRAY_SIZE(rates),
|
||||
.list = rates,
|
||||
.mask = 0,
|
||||
};
|
||||
|
||||
static unsigned int channels[] = {
|
||||
static const unsigned int channels[] = {
|
||||
2,
|
||||
};
|
||||
|
||||
static struct snd_pcm_hw_constraint_list constraints_channels = {
|
||||
static const struct snd_pcm_hw_constraint_list constraints_channels = {
|
||||
.count = ARRAY_SIZE(channels),
|
||||
.list = channels,
|
||||
.mask = 0,
|
||||
@ -264,11 +264,11 @@ static int skylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int channels_dmic[] = {
|
||||
static const unsigned int channels_dmic[] = {
|
||||
2, 4,
|
||||
};
|
||||
|
||||
static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
|
||||
static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
|
||||
.count = ARRAY_SIZE(channels_dmic),
|
||||
.list = channels_dmic,
|
||||
.mask = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user