]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
ALSA: pcm: Constify the list in snd_pcm_hw_constraint_list
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 14 Mar 2012 19:48:43 +0000 (19:48 +0000)
committerTakashi Iwai <tiwai@suse.de>
Thu, 15 Mar 2012 06:35:17 +0000 (07:35 +0100)
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>
include/sound/pcm.h
sound/core/pcm_lib.c

index 0cf91b2f08caaf4f9a8a70cee07a25cacc108986..4ae9e22c48274347bab444cca22dbf9c28d0fc60 100644 (file)
@@ -264,7 +264,7 @@ struct snd_pcm_hw_constraint_ratdens {
 
 struct snd_pcm_hw_constraint_list {
        unsigned int count;
-       unsigned int *list;
+       const unsigned int *list;
        unsigned int mask;
 };
 
@@ -781,7 +781,8 @@ void snd_interval_muldivk(const struct snd_interval *a, const struct snd_interva
                          unsigned int k, struct snd_interval *c);
 void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k,
                          const struct snd_interval *b, struct snd_interval *c);
-int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int *list, unsigned int mask);
+int snd_interval_list(struct snd_interval *i, unsigned int count,
+                     const unsigned int *list, unsigned int mask);
 int snd_interval_ratnum(struct snd_interval *i,
                        unsigned int rats_count, struct snd_ratnum *rats,
                        unsigned int *nump, unsigned int *denp);
index 3420bd3da5d70ffec570e058d84b20f39aab49b8..4d18941178e6e933cb0f80f969c4d705c4777caf 100644 (file)
@@ -1029,7 +1029,8 @@ static int snd_interval_ratden(struct snd_interval *i,
  *
  * Returns non-zero if the value is changed, zero if not changed.
  */
-int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int *list, unsigned int mask)
+int snd_interval_list(struct snd_interval *i, unsigned int count,
+                     const unsigned int *list, unsigned int mask)
 {
         unsigned int k;
        struct snd_interval list_range;