[alsa-devel] [PATCH 25/31] ALSA: rme96: Constify hw_constraints
Takashi Iwai
tiwai at suse.de
Thu Jun 8 23:08:46 CEST 2017
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 at suse.de>
---
sound/pci/rme96.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c
index 24f1349a8e1b..2e19ba55e754 100644
--- a/sound/pci/rme96.c
+++ b/sound/pci/rme96.c
@@ -1163,9 +1163,9 @@ snd_rme96_interrupt(int irq,
return IRQ_HANDLED;
}
-static unsigned int period_bytes[] = { RME96_SMALL_BLOCK_SIZE, RME96_LARGE_BLOCK_SIZE };
+static const unsigned int period_bytes[] = { RME96_SMALL_BLOCK_SIZE, RME96_LARGE_BLOCK_SIZE };
-static struct snd_pcm_hw_constraint_list hw_constraints_period_bytes = {
+static const struct snd_pcm_hw_constraint_list hw_constraints_period_bytes = {
.count = ARRAY_SIZE(period_bytes),
.list = period_bytes,
.mask = 0
--
2.13.0
More information about the Alsa-devel
mailing list