From: Takashi Iwai Date: Wed, 7 Jun 2017 12:20:40 +0000 (+0200) Subject: ALSA: ice1712: Constify hw_constraints X-Git-Tag: v4.13-rc4~15^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5cf30ddf81bd0074eb0d867fc99a6f52997db71b;p=platform%2Fkernel%2Flinux-exynos.git ALSA: ice1712: 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 --- diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 6b650ab..0e66afa 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c @@ -932,10 +932,10 @@ static int snd_ice1712_pcm_ds(struct snd_ice1712 *ice, int device) * PCM code - professional part (multitrack) */ -static unsigned int rates[] = { 8000, 9600, 11025, 12000, 16000, 22050, 24000, +static const unsigned int rates[] = { 8000, 9600, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }; -static struct snd_pcm_hw_constraint_list hw_constraints_rates = { +static const struct snd_pcm_hw_constraint_list hw_constraints_rates = { .count = ARRAY_SIZE(rates), .list = rates, .mask = 0, diff --git a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h index 58f8f2a..5cfba09 100644 --- a/sound/pci/ice1712/ice1712.h +++ b/sound/pci/ice1712/ice1712.h @@ -348,7 +348,7 @@ struct snd_ice1712 { struct mutex open_mutex; struct snd_pcm_substream *pcm_reserved[4]; - struct snd_pcm_hw_constraint_list *hw_rates; /* card-specific rate constraints */ + const struct snd_pcm_hw_constraint_list *hw_rates; /* card-specific rate constraints */ unsigned int akm_codecs; struct snd_akm4xxx *akm;