aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-14 15:48:43 -0400
committerTakashi Iwai <tiwai@suse.de>2012-03-15 02:35:17 -0400
commit4af87a939ef7092fdca267fba473cf8407d6d8e2 (patch)
treeb35dac738d2e5ec6f778b3095246dbac2a1be255
parent28aa165cc52fa686a55a2a2052fdddad0fbde5eb (diff)
ALSA: pcm: Constify the list in snd_pcm_hw_constraint_list
Allows the constraint lists to be declared const by drivers which seems reasonable; there's plenty of other constification we could do if we were being complete but this was easy and quick. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--include/sound/pcm.h5
-rw-r--r--sound/core/pcm_lib.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 0cf91b2f08ca..4ae9e22c4827 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -264,7 +264,7 @@ struct snd_pcm_hw_constraint_ratdens {
264 264
265struct snd_pcm_hw_constraint_list { 265struct snd_pcm_hw_constraint_list {
266 unsigned int count; 266 unsigned int count;
267 unsigned int *list; 267 const unsigned int *list;
268 unsigned int mask; 268 unsigned int mask;
269}; 269};
270 270
@@ -781,7 +781,8 @@ void snd_interval_muldivk(const struct snd_interval *a, const struct snd_interva
781 unsigned int k, struct snd_interval *c); 781 unsigned int k, struct snd_interval *c);
782void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k, 782void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k,
783 const struct snd_interval *b, struct snd_interval *c); 783 const struct snd_interval *b, struct snd_interval *c);
784int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int *list, unsigned int mask); 784int snd_interval_list(struct snd_interval *i, unsigned int count,
785 const unsigned int *list, unsigned int mask);
785int snd_interval_ratnum(struct snd_interval *i, 786int snd_interval_ratnum(struct snd_interval *i,
786 unsigned int rats_count, struct snd_ratnum *rats, 787 unsigned int rats_count, struct snd_ratnum *rats,
787 unsigned int *nump, unsigned int *denp); 788 unsigned int *nump, unsigned int *denp);
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 3420bd3da5d7..4d18941178e6 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -1029,7 +1029,8 @@ static int snd_interval_ratden(struct snd_interval *i,
1029 * 1029 *
1030 * Returns non-zero if the value is changed, zero if not changed. 1030 * Returns non-zero if the value is changed, zero if not changed.
1031 */ 1031 */
1032int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int *list, unsigned int mask) 1032int snd_interval_list(struct snd_interval *i, unsigned int count,
1033 const unsigned int *list, unsigned int mask)
1033{ 1034{
1034 unsigned int k; 1035 unsigned int k;
1035 struct snd_interval list_range; 1036 struct snd_interval list_range;