ALSA: pcm: Make constraints lists const
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 5 Jul 2012 11:15:01 +0000 (12:15 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 5 Jul 2012 12:19:39 +0000 (14:19 +0200)
They aren't modified by the core so the drivers can declare them const.

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 68372bc1e11b649e3081a120f76e4bedc03fdd55..e91e6047ca6f6ec2d3635821da43a95837af443e 100644 (file)
@@ -810,7 +810,7 @@ int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_pa
 int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime, 
                               unsigned int cond,
                               snd_pcm_hw_param_t var,
-                              struct snd_pcm_hw_constraint_list *l);
+                              const struct snd_pcm_hw_constraint_list *l);
 int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, 
                                  unsigned int cond,
                                  snd_pcm_hw_param_t var,
index 8f312fa6c282c88db2cd0c84389096228fe70fc4..7ae6719233933b9eb904aea87da3543b2b671312 100644 (file)
@@ -1250,10 +1250,10 @@ static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params,
 int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime,
                               unsigned int cond,
                               snd_pcm_hw_param_t var,
-                              struct snd_pcm_hw_constraint_list *l)
+                              const struct snd_pcm_hw_constraint_list *l)
 {
        return snd_pcm_hw_rule_add(runtime, cond, var,
-                                  snd_pcm_hw_rule_list, l,
+                                  snd_pcm_hw_rule_list, (void *)l,
                                   var, -1);
 }