summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-06-07 08:23:13 -0400
committerTakashi Iwai <tiwai@suse.de>2017-06-09 04:42:56 -0400
commitfbc57b2a3e74fd56581bc2acacade9eac22544bd (patch)
tree7cea92092919289d4839984f9042e4180f361d65
parentde900b182ef1826e887c4458d7af0696f08fcc4b (diff)
ALSA: via82xx: 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>
-rw-r--r--sound/pci/via82xx.c4
-rw-r--r--sound/pci/via82xx_modem.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index b6c84d15b10b..c767b8664359 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -1286,10 +1286,10 @@ static int snd_via8233_multi_open(struct snd_pcm_substream *substream)
1286 /* channels constraint for VIA8233A 1286 /* channels constraint for VIA8233A
1287 * 3 and 5 channels are not supported 1287 * 3 and 5 channels are not supported
1288 */ 1288 */
1289 static unsigned int channels[] = { 1289 static const unsigned int channels[] = {
1290 1, 2, 4, 6 1290 1, 2, 4, 6
1291 }; 1291 };
1292 static struct snd_pcm_hw_constraint_list hw_constraints_channels = { 1292 static const struct snd_pcm_hw_constraint_list hw_constraints_channels = {
1293 .count = ARRAY_SIZE(channels), 1293 .count = ARRAY_SIZE(channels),
1294 .list = channels, 1294 .list = channels,
1295 .mask = 0, 1295 .mask = 0,
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c
index 2f6d40f10618..55f79b2599e7 100644
--- a/sound/pci/via82xx_modem.c
+++ b/sound/pci/via82xx_modem.c
@@ -744,8 +744,8 @@ static int snd_via82xx_modem_pcm_open(struct via82xx_modem *chip, struct viadev
744{ 744{
745 struct snd_pcm_runtime *runtime = substream->runtime; 745 struct snd_pcm_runtime *runtime = substream->runtime;
746 int err; 746 int err;
747 static unsigned int rates[] = { 8000, 9600, 12000, 16000 }; 747 static const unsigned int rates[] = { 8000, 9600, 12000, 16000 };
748 static struct snd_pcm_hw_constraint_list hw_constraints_rates = { 748 static const struct snd_pcm_hw_constraint_list hw_constraints_rates = {
749 .count = ARRAY_SIZE(rates), 749 .count = ARRAY_SIZE(rates),
750 .list = rates, 750 .list = rates,
751 .mask = 0, 751 .mask = 0,