summaryrefslogtreecommitdiff
path: root/sound/soc/intel/boards/bxt_rt298.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-06-14 09:33:06 +0200
committerMark Brown <broonie@kernel.org>2017-06-14 10:38:12 +0100
commit21031d531eb33a6ad0251ff661a539802700c6e5 (patch)
treeb6dbac10351b8bd651c84f48335db6c086637b58 /sound/soc/intel/boards/bxt_rt298.c
parent7c197881e163f34679b941c75500a6c85560b7c9 (diff)
ASoC: intel: bxt: 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> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/bxt_rt298.c')
-rw-r--r--sound/soc/intel/boards/bxt_rt298.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c
index 36ee7480e9f1..0c3a3cbcb884 100644
--- a/sound/soc/intel/boards/bxt_rt298.c
+++ b/sound/soc/intel/boards/bxt_rt298.c
@@ -207,11 +207,11 @@ static const struct snd_soc_ops broxton_rt298_ops = {
.hw_params = broxton_rt298_hw_params,
};
-static unsigned int rates[] = {
+static const unsigned int rates[] = {
48000,
};
-static struct snd_pcm_hw_constraint_list constraints_rates = {
+static const struct snd_pcm_hw_constraint_list constraints_rates = {
.count = ARRAY_SIZE(rates),
.list = rates,
.mask = 0,
@@ -227,11 +227,11 @@ static int broxton_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
return 0;
}
-static unsigned int channels_dmic[] = {
+static const unsigned int channels_dmic[] = {
1, 2, 3, 4,
};
-static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
.count = ARRAY_SIZE(channels_dmic),
.list = channels_dmic,
.mask = 0,
@@ -253,11 +253,11 @@ static const struct snd_soc_ops broxton_dmic_ops = {
.startup = broxton_dmic_startup,
};
-static unsigned int channels[] = {
+static const unsigned int channels[] = {
2,
};
-static struct snd_pcm_hw_constraint_list constraints_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_channels = {
.count = ARRAY_SIZE(channels),
.list = channels,
.mask = 0,