提交 8eba3b30 编写于 作者: T Takashi Iwai

ALSA: ali5451: 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: NTakashi Iwai <tiwai@suse.de>
上级 d236d361
......@@ -1602,8 +1602,8 @@ static struct snd_pcm_hardware snd_ali_modem =
static int snd_ali_modem_open(struct snd_pcm_substream *substream, int rec,
int channel)
{
static unsigned int rates[] = {8000, 9600, 12000, 16000};
static struct snd_pcm_hw_constraint_list hw_constraint_rates = {
static const unsigned int rates[] = {8000, 9600, 12000, 16000};
static const struct snd_pcm_hw_constraint_list hw_constraint_rates = {
.count = ARRAY_SIZE(rates),
.list = rates,
.mask = 0,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册