diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-06-07 14:21:31 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-06-09 10:42:53 +0200 |
commit | 0f470ce622230b7ebfb88ec8db8676e278867046 (patch) | |
tree | 2fcd3312728f08cd257d966bf7c47c7caa843121 /sound/pci | |
parent | 965f19bed24d240c845401015e42ad5cb0cca00c (diff) | |
download | op-kernel-dev-0f470ce622230b7ebfb88ec8db8676e278867046.zip op-kernel-dev-0f470ce622230b7ebfb88ec8db8676e278867046.tar.gz |
ALSA: intel8x0: 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>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/intel8x0.c | 12 | ||||
-rw-r--r-- | sound/pci/intel8x0m.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 6d17b17..a8d7092 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -1136,31 +1136,31 @@ static struct snd_pcm_hardware snd_intel8x0_stream = .fifo_size = 0, }; -static unsigned int channels4[] = { +static const unsigned int channels4[] = { 2, 4, }; -static struct snd_pcm_hw_constraint_list hw_constraints_channels4 = { +static const struct snd_pcm_hw_constraint_list hw_constraints_channels4 = { .count = ARRAY_SIZE(channels4), .list = channels4, .mask = 0, }; -static unsigned int channels6[] = { +static const unsigned int channels6[] = { 2, 4, 6, }; -static struct snd_pcm_hw_constraint_list hw_constraints_channels6 = { +static const struct snd_pcm_hw_constraint_list hw_constraints_channels6 = { .count = ARRAY_SIZE(channels6), .list = channels6, .mask = 0, }; -static unsigned int channels8[] = { +static const unsigned int channels8[] = { 2, 4, 6, 8, }; -static struct snd_pcm_hw_constraint_list hw_constraints_channels8 = { +static const struct snd_pcm_hw_constraint_list hw_constraints_channels8 = { .count = ARRAY_SIZE(channels8), .list = channels8, .mask = 0, diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 1bc98c8..18ff668 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c @@ -635,8 +635,8 @@ static struct snd_pcm_hardware snd_intel8x0m_stream = static int snd_intel8x0m_pcm_open(struct snd_pcm_substream *substream, struct ichdev *ichdev) { - static unsigned int rates[] = { 8000, 9600, 12000, 16000 }; - static struct snd_pcm_hw_constraint_list hw_constraints_rates = { + static const unsigned int rates[] = { 8000, 9600, 12000, 16000 }; + static const struct snd_pcm_hw_constraint_list hw_constraints_rates = { .count = ARRAY_SIZE(rates), .list = rates, .mask = 0, |