]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: ice1712: Constify hw_constraints
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Jun 2017 12:20:40 +0000 (14:20 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Jun 2017 08:42:52 +0000 (10:42 +0200)
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>
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1712.h

index 6b650ab2a08472c4cf2f7026f9818db829af05f2..0e66afa403a37ca25908a0595cca2c32efc2307b 100644 (file)
@@ -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,
index 58f8f2ae758db3d1c090b9d7b7ea8183ad679f69..5cfba09c97614c752ad89d441809ddf5f946aa7f 100644 (file)
@@ -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;